Navigation
API > API/Runtime > API/Runtime/NavigationSystem
Represents abstract Navigation Data (sub-classed as NavMesh, NavGraph, etc) Used as a common interface for all navigation types handled by NavigationSystem
| Name | ANavigationData |
| Type | class |
| Header File | /Engine/Source/Runtime/NavigationSystem/Public/NavigationData.h |
| Include Path | #include "NavigationData.h" |
Syntax
UCLASS (Config=Engine, defaultconfig, NotBlueprintable, Abstract, MinimalAPI)
class ANavigationData :
public AActor ,
public INavigationDataInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → ANavigationData
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ANavigationData
(
const FObjectInitializer& ObjectInitializer |
NavigationData.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FFindPathPtr | FPathFindingResult(*) | NavigationData.h | |
| FNavRaycastPtr | bool(*) | NavigationData.h | |
| FNavRaycastWithAdditionalResultsPtr | bool(*) | NavigationData.h | |
| FTestPathPtr | bool(*) | NavigationData.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| RenderingComp | TObjectPtr< UPrimitiveComponent > | NavigationData.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NavDataUniqueID | uint16 | NavigationData.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BatchProjectPoints
(
TArray< FNavigationProjectionWork >& Workload, |
Batches ProjectPoint's work for efficiency | NavigationData.h | |
virtual void BatchProjectPoints
(
TArray< FNavigationProjectionWork >& Workload, |
Project batch of points using shared search filter. | NavigationData.h | |
virtual void BatchRaycast
(
TArray< FNavigationRaycastWork >& Workload, |
Raycasts batched for efficiency | NavigationData.h | |
virtual void BeginBatchQuery () |
Batch processing (important with async rebuilding) | NavigationData.h | |
virtual ENavigationQueryResult::Type CalcPathCost
(
const FVector& PathStart, |
Calculates path from PathStart to PathEnd and retrieves its cost. | NavigationData.h | |
virtual ENavigationQueryResult::Type CalcPathLength
(
const FVector& PathStart, |
Calculates path from PathStart to PathEnd and retrieves its length. | NavigationData.h | |
virtual ENavigationQueryResult::Type CalcPathLengthAndCost
(
const FVector& PathStart, |
Calculates path from PathStart to PathEnd and retrieves its length. | NavigationData.h | |
bool CanBeMainNavData() |
NavigationData.h | ||
virtual void CancelBuild() |
Cancels current build | NavigationData.h | |
bool CanSpawnOnRebuild() |
NavigationData.h | ||
virtual void CleanUp() |
NavigationData.h | ||
virtual void CleanUpAndMarkPendingKill() |
NavigationData.h | ||
virtual void ConditionalConstructGenerator() |
Creates new generator in case navigation supports it | NavigationData.h | |
virtual UPrimitiveComponent * ConstructRenderingComponent() |
All the rest | NavigationData.h | |
FNavPathSharedPtr CreatePathInstance
(
const FPathFindingQueryData& QueryData |
Created an instance of navigation path of specified type. | NavigationData.h | |
virtual bool DoesNodeContainLocation
(
NavNodeRef NodeRef, |
Checks if specified navigation node contains given location | NavigationData.h | |
virtual bool DoesSupportAgent
(
const FNavAgentProperties& AgentProps |
NavigationData.h | ||
void DrawDebugPath
(
FNavigationPath* Path, |
Debug | NavigationData.h | |
virtual void EnsureBuildCompletion() |
Blocks until navigation build is complete | NavigationData.h | |
virtual void FillNavigationDataChunkActor
(
const FBox& QueryBounds, |
NavigationData.h | ||
FPathFindingResult FindHierarchicalPath
(
const FNavAgentProperties& AgentProperties, |
Synchronously looks for a path from @StartLocation to @EndLocation for agent with properties @AgentProperties. | NavigationData.h | |
virtual bool FindOverlappingEdges
(
const FNavLocation& StartLocation, |
Returns the navmesh edges that touch the convex polygon. The edges are not clipped by the polygon. | NavigationData.h | |
FPathFindingResult FindPath
(
const FNavAgentProperties& AgentProperties, |
Synchronously looks for a path from @StartLocation to @EndLocation for agent with properties @AgentProperties. | NavigationData.h | |
virtual void FinishBatchQuery() |
Finishes batch processing and release locks | NavigationData.h | |
const UClass * GetAreaClass
(
int32 AreaID |
Get class associated with AreaID | NavigationData.h | |
int32 GetAreaID
(
const UClass* AreaClass |
Get ID assigned to AreaClas or -1 when not assigned | NavigationData.h | |
virtual FBox GetBounds() |
Returns bounding box for the navmesh. | NavigationData.h | |
const FNavDataConfig & GetConfig() |
Generation & data access | NavigationData.h | |
FVector GetDefaultQueryExtent() |
NavigationData.h | ||
FSharedConstNavQueryFilter GetDefaultQueryFilter() |
Querying | NavigationData.h | |
const INavigationQueryFilterInterface * GetDefaultQueryFilterImpl() |
NavigationData.h | ||
| Retrieves navigation data generator | NavigationData.h | ||
const FNavDataGenerator * GetGenerator () |
NavigationData.h | ||
virtual int32 GetMaxSupportedAreas() |
Get max areas supported by this navigation data | NavigationData.h | |
const FNavAgentProperties & GetNavAgentProperties() |
NavigationData.h | ||
uint16 GetNavDataUniqueID() |
NavigationData.h | ||
TArray< FBox > GetNavigableBounds() |
Returns list of navigable bounds. | NavigationData.h | |
| Returns list of navigable bounds that belongs to specific level | NavigationData.h | ||
virtual int32 GetNumSuspendedDirtyAreas() |
Retrieves the number of suspended dirty areas | NavigationData.h | |
virtual bool GetPathSegmentBoundaryEdges
(
const FNavigationPath& Path, |
Searches navmesh edges between the two path points, search up to the convex polygon described in SearchArea. | NavigationData.h | |
FSharedConstNavQueryFilter GetQueryFilter
(
TSubclassOf< UNavigationQueryFilter > FilterClass |
Filters. | NavigationData.h | |
virtual FNavLocation GetRandomPoint
(
FSharedConstNavQueryFilter Filter, |
NavigationData.h | ||
virtual bool GetRandomPointInNavigableRadius
(
const FVector& Origin, |
Finds a random location in navigable space, in given Radius | NavigationData.h | |
virtual bool GetRandomReachablePointInRadius
(
const FVector& Origin, |
Finds a random location in Radius, reachable from Origin | NavigationData.h | |
ERuntimeGenerationType GetRuntimeGenerationMode() |
NavigationData.h | ||
void GetSupportedAreas
(
TArray< FSupportedAreaData >& Areas |
Read all supported areas | NavigationData.h | |
virtual double GetWorldPartitionNavigationDataBuilderOverlap() |
NavigationData.h | ||
double GetWorldTimeStamp() |
NavigationData.h | ||
bool IsAreaAssigned
(
int32 AreaID |
Check if AreaID was assigned to class (class itself may not be loaded yet!) | NavigationData.h | |
bool IsBuildingOnLoad() |
NavigationData.h | ||
bool IsDrawingEnabled() |
NavigationData.h | ||
virtual bool IsRebuildingSuspended() |
Retrieves if this NavData instance's navigation generation is suspended | NavigationData.h | |
bool IsRegistered() |
NavigationData.h | ||
bool IsSupportingDefaultAgent() |
NavigationData.h | ||
virtual void LoadBeforeGeneratorRebuild() |
Any loading before NavDataGenerator->RebuildAll() | NavigationData.h | |
virtual uint32 LogMemUsed() |
NavigationData.h | ||
virtual bool NeedsRebuild() |
NavigationData.h | ||
bool NeedsRebuildOnLoad() |
NavigationData.h | ||
virtual void OnNavAreaAdded
(
const UClass* NavAreaClass, |
Areas. | NavigationData.h | |
virtual void OnNavAreaChanged() |
Called after changes to registered area classes | NavigationData.h | |
void OnNavAreaEvent
(
const UClass* NavAreaClass, |
NavigationData.h | ||
virtual void OnNavAreaRemoved
(
const UClass* NavAreaClass |
Area was removed from navigation system | NavigationData.h | |
virtual void OnNavigationBoundsChanged() |
NavigationData.h | ||
virtual void OnRegistered() |
NavigationData.h | ||
| NavigationData.h | |||
| NavigationData.h | |||
virtual void OnStreamingNavDataAdded
(
ANavigationDataChunkActor& InActor |
NavigationData.h | ||
virtual void OnStreamingNavDataRemoved
(
ANavigationDataChunkActor& InActor |
NavigationData.h | ||
void OnUnregistered() |
NavigationData.h | ||
virtual void PostLoadPreRebuild() |
Runs after LoadBeforeGeneratorRebuild but before the rebuild. | NavigationData.h | |
void ProcessNavAreas
(
const TSet< const UClass* >& AreaClasses, |
Add all existing areas | NavigationData.h | |
| Synchronously makes a raycast on navigation data using QueryFilter | NavigationData.h | ||
bool Raycast
(
const FVector& RayStart, |
Synchronously makes a raycast on navigation data using QueryFilter | NavigationData.h | |
virtual void RebuildAll() |
Triggers rebuild in case navigation supports it | NavigationData.h | |
virtual void RebuildDirtyAreas
(
const TArray< FNavigationDirtyArea >& DirtyAreas |
Request navigation data update after changes in nav octree | NavigationData.h | |
void RegisterObservedPath
(
FNavPathSharedPtr SharedPath |
NavigationData.h | ||
void RemoveQueryFilter
(
TSubclassOf< UNavigationQueryFilter > FilterClass |
Removes cached query filter | NavigationData.h | |
void RequestRePath
(
FNavPathSharedPtr Path, |
NavigationData.h | ||
virtual void RestrictBuildingToActiveTiles
(
bool InRestrictBuildingToActiveTiles |
NavigationData.h | ||
virtual void SetConfig
(
const FNavDataConfig& Src |
Populates NavDataConfig and sets NavAgentProperties with the Src config Should be used when initially configuring the navdata and not when updating values used in NavDataConfig | NavigationData.h | |
void SetIsBuildingOnLoad
(
bool bValue |
NavigationData.h | ||
void SetNavRenderingEnabled
(
bool bEnable |
Updates state of rendering component | NavigationData.h | |
virtual void SetRebuildingSuspended
(
const bool bNewSuspend |
Configures this NavData instance's navigation generation to be suspended or active. | NavigationData.h | |
void SetSupportsDefaultAgent
(
bool bIsDefault |
NavigationData.h | ||
void StoreQueryFilter
(
TSubclassOf< UNavigationQueryFilter > FilterClass, |
Store cached query filter | NavigationData.h | |
virtual bool SupportsRuntimeGeneration() |
NavigationData.h | ||
virtual bool SupportsStreaming() |
NavigationData.h | ||
bool TestHierarchicalPath
(
const FNavAgentProperties& AgentProperties, |
Synchronously checks if path between two points exists using hierarchical graph FNavAgentProperties will be found automatically | NavigationData.h | |
bool TestPath
(
const FNavAgentProperties& AgentProperties, |
Synchronously checks if path between two points exists FNavAgentProperties will be found automatically | NavigationData.h | |
virtual void TickAsyncBuild
(
float DeltaSeconds |
Ticks navigation build If the generator is set to time sliced rebuild then this function will only get called when there is sufficient time (effectively roughly once in n frames where n is the number of time sliced nav data generators currently building) | NavigationData.h | |
virtual void UpdateCustomLink
(
const INavLinkCustomInterface* CustomLink |
Custom navigation links. | NavigationData.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyWorldOffset
(
const FVector& InOffset, |
NavigationData.h | ||
virtual bool CanChangeIsSpatiallyLoadedFlag() |
NavigationData.h | ||
virtual void Destroyed() |
NavigationData.h | ||
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
NavigationData.h | ||
virtual void PostInitializeComponents() |
NavigationData.h | ||
virtual void RerunConstructionScripts() |
NavigationData.h | ||
virtual void TickActor
(
float DeltaTime, |
NavigationData.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditUndo() |
NavigationData.h | ||
virtual void PostInitProperties() |
Life cycle | NavigationData.h | |
virtual void PostLoad() |
NavigationData.h |
Overridden from INavigationDataInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool FindMoveAlongSurface
(
const FNavLocation& StartLocation, |
Tries to move current nav location towards target constrained to navigable area. | NavigationData.h | |
virtual bool ProjectPoint
(
const FVector& Point, |
Tries to project given Point to this navigation type, within given Extent. | NavigationData.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FillConfig
(
FNavDataConfig& Dest |
NavigationData.h | ||
virtual int32 GetNewAreaID
(
const UClass* AreaClass |
Get ID to assign for newly added area | NavigationData.h | |
void InstantiateAndRegisterRenderingComponent() |
NavigationData.h | ||
void PurgeUnusedPaths() |
Removes from ActivePaths all paths that no longer have shared references (and are invalid in fact) | NavigationData.h | |
void RegisterActivePath
(
FNavPathSharedPtr SharedPath |
NavigationData.h | ||
void RegisterAsNavAreaClassObserver() |
Releases navigation generator if any has been created register self with navigation system as new NavAreaDefinition(s) observer | NavigationData.h | |
void RequestRegistration() |
NavigationData.h | ||
void SetNavAgentProperties
(
const FNavAgentProperties& InNavAgentProperties |
NavigationData.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static uint16 GetNextUniqueID() |
NavigationData.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bRebuildAtRuntime_DEPRECATED | uint32 | If true, the NavMesh can be dynamically rebuilt at runtime. | NavigationData.h |
|