Files
UnrealEngineUWP/Engine/Source/Runtime/NavigationSystem/Public/NavLinkComponent.h
Yoan StAmant 2d3f7662a4 NavLinkComponent: Fixed NavigationLink AreaClass cache when the component gets reregistered after running construction scripts for blueprint classes.
NavLinkRenderingProxy: Added support for components implementing INavLinkHostInterface so it can render links from NavLinkComponent.
NavLinkProxy: Appended link from the SmartLinkComponent when it's NavigationRelevent so it gets rendered with the simple links

#review-7825101 @mieszko.zielinski
#rb mieszko.zielinski

[CL 7879962 by Yoan StAmant in Main branch]
2019-08-08 10:20:06 -04:00

45 lines
1.6 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "Templates/SubclassOf.h"
#include "Components/PrimitiveComponent.h"
#include "AI/Navigation/NavLinkDefinition.h"
#include "NavLinkHostInterface.h"
#include "NavLinkComponent.generated.h"
class FPrimitiveSceneProxy;
struct FNavigationRelevantData;
UCLASS(ClassGroup = (Navigation), meta = (BlueprintSpawnableComponent), hidecategories = (Activation))
class NAVIGATIONSYSTEM_API UNavLinkComponent : public UPrimitiveComponent, public INavLinkHostInterface
{
GENERATED_UCLASS_BODY()
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Navigation)
TArray<FNavigationLink> Links;
virtual void GetNavigationData(FNavigationRelevantData& Data) const override;
virtual bool IsNavigationRelevant() const override;
virtual bool GetNavigationLinksClasses(TArray<TSubclassOf<class UNavLinkDefinition> >& OutClasses) const override { return false; }
virtual bool GetNavigationLinksArray(TArray<FNavigationLink>& OutLink, TArray<FNavigationSegmentLink>& OutSegments) const override;
virtual FBoxSphereBounds CalcBounds(const FTransform &LocalToWorld) const override;
virtual FPrimitiveSceneProxy* CreateSceneProxy() override;
virtual bool ShouldRecreateProxyOnUpdateTransform() const override { return true; }
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
virtual void PostEditUndo() override;
virtual void PostEditImport() override;
#endif // WITH_EDITOR
virtual void OnRegister() override;
protected:
void InitializeLinksAreaClasses();
};