Navigation
API > API/Runtime > API/Runtime/NavigationSystem
Inheritance Hierarchy
- UActorComponent
- INavRelevantInterface
- UNavRelevantComponent
- UNavLinkCustomComponent
References
| Module | NavigationSystem |
| Header | /Engine/Source/Runtime/NavigationSystem/Public/NavLinkCustomComponent.h |
| Include | #include "NavLinkCustomComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UNavLinkCustomComponent :
public UNavRelevantComponent ,
public INavLinkCustomInterface
Remarks
Encapsulates NavLinkCustomInterface interface, can be used with Actors not relevant for navigation
Additional functionality:
- can be toggled
- can create obstacle area for easier/forced separation of link end points
- can broadcast state changes to nearby agents
Variables
| Type | Name | Description | |
|---|---|---|---|
| FNavLinkAuxiliaryId | AuxiliaryCustomLinkId | Assigned in the constructor. | |
| uint32: 1 | bCreateBoxObstacle | If set, box obstacle area will be added to generation | |
| uint32: 1 | bLinkEnabled | Is link currently in enabled state? (area class) | |
| uint32: 1 | bNotifyWhenDisabled | Should link notify nearby agents when it changes state to disabled | |
| uint32: 1 | bNotifyWhenEnabled | Should link notify nearby agents when it changes state to enabled | |
| TEnumAsByte< ECollisionChannel > | BroadcastChannel | Trace channel for state change broadcast | |
| float | BroadcastInterval | Interval for state change broadcast (0 = single broadcast) | |
| float | BroadcastRadius | Radius of state change broadcast | |
| FNavLinkId | CustomLinkId | Link Id assigned by navigation system | |
| TSubclassOf< UNavArea > | DisabledAreaClass | Area class to use when link is disabled | |
| TSubclassOf< UNavArea > | EnabledAreaClass | Area class to use when link is enabled | |
| TEnumAsByte< ENavLinkDirection::Type > | LinkDirection | Direction of link | |
| FVector | LinkRelativeEnd | End point, relative to owner | |
| FVector | LinkRelativeStart | Start point, relative to owner | |
| TArray< TWeakObjectPtr< UObject > > | MovingAgents | List of agents moving though this link | |
| uint32 | NavLinkUserId | ||
| TSubclassOf< UNavArea > | ObstacleAreaClass | Area class for simple box obstacle | |
| FVector | ObstacleExtent | Extent of simple box obstacle | |
| FVector | ObstacleOffset | Offset of simple box obstacle | |
| FBroadcastFilter | OnBroadcastFilter | Delegate to call when link is reached | |
| FOnMoveReachedLink | OnMoveReachedLink | Delegate to call when link is reached | |
| FDelegateHandle | OnNavAreaRegisteredDelegateHandle | ||
| FDelegateHandle | OnNavAreaUnregisteredDelegateHandle | ||
| FNavAgentSelector | SupportedAgents | Restrict area only to specified agents | |
| FTimerHandle | TimerHandle_BroadcastStateChange | Handle for efficient management of BroadcastStateChange timer |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNavLinkCustomComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddNavigationObstacle
(
TSubclassOf< UNavArea > AreaClass, |
Add box obstacle during generation of navigation data this can be used to create empty area under doors | |
| void | ApplyComponentInstanceData
(
FNavLinkCustomInstanceData* ComponentInstanceData |
||
| void | Notify nearby agents about link changing state | ||
| void | Removes simple obstacle | ||
| void | CollectNearbyAgents
(
TArray< UObject* >& NotifyList |
Gather agents to notify about state change | |
| TStructOnScope< FActorComponentInstanceData > | |||
| TSubclassOf< UNavArea > | |||
| TSubclassOf< UNavArea > | |||
| FVector | GetEndPoint () |
Get link end point in world space | |
| FNavigationLink | |||
| void | GetNavigationData
(
FNavigationRelevantData& Data |
||
| TSubclassOf< UNavArea > | |||
| FVector | Get link start point in world space | ||
| FNavAgentSelector | |||
| bool | Check is any agent is currently moving though this link | ||
| bool | IsEnabled () |
||
| void | OnNavAreaRegistered
(
const UWorld& World, |
||
| void | OnNavAreaUnregistered
(
const UWorld& World, |
||
| void | |||
| void | PostLoad () |
||
| void | SendBroadcastWhenDisabled
(
bool bEnabled |
||
| void | SendBroadcastWhenEnabled
(
bool bEnabled |
||
| void | Serialize
(
FArchive& Ar |
||
| void | SetBroadcastData
(
float Radius, |
Set properties of trigger around link entry point(s), that will notify nearby agents about link state change | |
| void | SetBroadcastFilter
(
UserClass* TargetOb, |
||
| void | SetBroadcastFilter
(
UserClass* TargetOb, |
||
| void | SetBroadcastFilter
(
FBroadcastFilter const& InDelegate |
Set delegate to filter | |
| void | SetDisabledArea
(
TSubclassOf< UNavArea > AreaClass |
Set area class to use when link is disabled | |
| void | SetEnabled
(
bool bNewEnabled |
Change state of smart link (used area class) | |
| void | SetEnabledArea
(
TSubclassOf< UNavArea > AreaClass |
Set area class to use when link is enabled | |
| void | SetLinkData
(
const FVector& RelativeStart, |
Set basic link data: end points and direction | |
| void | SetMoveReachedLink
(
FOnMoveReachedLink const& InDelegate |
Set delegate to notify about reaching this link during path following | |
| void | SetMoveReachedLink
(
UserClass* TargetOb, |
||
| void | SetMoveReachedLink
(
UserClass* TargetOb, |
||
| void | SetSupportedAgents
(
const FNavAgentSelector& InSupportedAgents |
Overridden from UNavRelevantComponent
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | OnRegister () |
||
| void | OnUnregister () |
Overridden from INavLinkCustomInterface
| Type | Name | Description | |
|---|---|---|---|
| FNavLinkAuxiliaryId | |||
| FNavLinkId | GetId () |
Get unique ID number for custom link Owner should get its unique ID by calling INavLinkCustomInterface::GetUniqueId() and store it | |
| TSubclassOf< UNavArea > | Get basic link data: area class (null = default walkable) | ||
| void | GetLinkData
(
FVector& LeftPt, |
Get basic link data: two points (relative to owner) and direction | |
| void | GetSupportedAgents
(
FNavAgentSelector& OutSupportedAgents |
Get agents supported by this link | |
| bool | IsLinkPathfindingAllowed
(
const UObject* Querier |
Check if link allows path finding Querier is usually an AIController trying to find path | |
| void | OnLinkMoveFinished
(
UObject* PathComp |
Notify called when agent finishes using this link for movement | |
| bool | OnLinkMoveStarted
(
UObject* PathComp, |
Notify called when agent starts using this link for movement. | |
| void | UpdateLinkId
(
FNavLinkId NewUniqueId |
Update unique ID number for custom link by navigation system. |
Typedefs
| Name | Description |
|---|---|
| FBroadcastFilter | |
| FOnMoveReachedLink |