Navigation
API > API/Runtime > API/Runtime/AIModule
ANavLinkProxy connects areas of Navmesh that don't have a direct navigation path. It directly supports Simple Links (see PointLinks array). There can be multiple Simple links per ANavLinkProxy instance. Simple links are designed to statically link areas of Navmesh and are associated with a particular area class that the link provides. Smart Link functionality is provided via UNavLinkCustomComponent, see SmartLinkComp. They are designed to be able to be dynamically toggled between enabled and disabled and provide different area classes for both cases. The area classes can be dynamically modified without navmesh rebuilds. There can only be at most one smart link per ANavLinkProxy instance. Both simple and smart links on a single ANavLinkProxy instance, can be set / enabled at once, as well as either or neither of them.
| Name | ANavLinkProxy |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/Navigation/NavLinkProxy.h |
| Include Path | #include "Navigation/NavLinkProxy.h" |
Syntax
UCLASS (Blueprintable, AutoCollapseCategories=(SmartLink, Actor), HideCategories=(Input),
MinimalAPI)
class ANavLinkProxy :
public AActor ,
public INavLinkHostInterface ,
public INavRelevantInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → ANavLinkProxy
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ANavLinkProxy
(
const FObjectInitializer& ObjectInitializer |
Navigation/NavLinkProxy.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bSmartLinkIsRelevant | bool | Smart link: toggle relevancy | Navigation/NavLinkProxy.h |
|
| PointLinks | TArray< FNavigationLink > | Navigation links (point to point) added to navigation data | Navigation/NavLinkProxy.h |
|
| SegmentLinks | TArray< FNavigationSegmentLink > | Navigation links (segment to segment) added to navigation data | Navigation/NavLinkProxy.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EdRenderComp | TObjectPtr< UNavLinkRenderingComponent > | Editor Preview | Navigation/NavLinkProxy.h | |
| SmartLinkComp | TObjectPtr< UNavLinkCustomComponent > | Smart link: can affect path following | Navigation/NavLinkProxy.h |
|
| SpriteComponent | TObjectPtr< UBillboardComponent > | Navigation/NavLinkProxy.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Copies navlink end points from the first entry in PointLinks array. | Navigation/NavLinkProxy.h |
|
|
UNavLinkRenderingComponent * GetEdRenderComp() |
Returns EdRenderComp subobject | Navigation/NavLinkProxy.h | |
virtual FBox GetNavigationBounds() |
Navigation/NavLinkProxy.h | ||
virtual void GetNavigationData
(
FNavigationRelevantData& Data |
Navigation/NavLinkProxy.h | ||
virtual bool GetNavigationLinksArray
(
TArray< FNavigationLink >& OutLink, |
Navigation/NavLinkProxy.h | ||
virtual bool GetNavigationLinksClasses
(
TArray< TSubclassOf< UNavLinkDefinition > >& OutClasses |
Navigation/NavLinkProxy.h | ||
UNavLinkCustomComponent * GetSmartLinkComp() |
Returns SmartLinkComp subobject | Navigation/NavLinkProxy.h | |
UBillboardComponent * GetSpriteComponent() |
Returns SpriteComponent subobject | Navigation/NavLinkProxy.h | |
bool HasMovingAgents() |
Check if any agent is moving through smart link right now | Navigation/NavLinkProxy.h |
|
virtual bool IsNavigationRelevant() |
Navigation/NavLinkProxy.h | ||
bool IsSmartLinkEnabled() |
Check if smart link is enabled | Navigation/NavLinkProxy.h |
|
void ReceiveSmartLinkReached
(
AActor* Agent, |
Called when agent reaches smart link during path following, use ResumePathFollowing() to give control back | Navigation/NavLinkProxy.h |
|
void ResumePathFollowing
(
AActor* Agent |
Resume normal path following | Navigation/NavLinkProxy.h |
|
void SetSmartLinkEnabled
(
bool bEnabled |
Change state of smart link | Navigation/NavLinkProxy.h |
|
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBox GetComponentsBoundingBox
(
bool bNonColliding, |
Navigation/NavLinkProxy.h | ||
virtual void PostRegisterAllComponents() |
Navigation/NavLinkProxy.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Navigation/NavLinkProxy.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Navigation/NavLinkProxy.h | ||
virtual void PostEditImport() |
Navigation/NavLinkProxy.h | ||
virtual void PostEditUndo() |
Navigation/NavLinkProxy.h | ||
virtual void PostInitProperties() |
Navigation/NavLinkProxy.h | ||
virtual void PostLoad() |
Navigation/NavLinkProxy.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void NotifySmartLinkReached
(
UNavLinkCustomComponent* LinkComp, |
Navigation/NavLinkProxy.h | ||
| Navigation/NavLinkProxy.h | |||
| Navigation/NavLinkProxy.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
Navigation/NavLinkProxy.h |