UNavigationSystemV1

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NavigationSystem

Header

/Engine/Source/Runtime/NavigationSystem/Public/NavigationSystem.h

Include

#include "NavigationSystem.h"

Syntax

class UNavigationSystemV1 : public UNavigationSystemBase

Variables

Name Description

Public variable

ANavigationData...

 

AbstractNavData

Special navigation data for managing direct paths, not part of NavDataSet!

Protected variable

float

 

ActiveTilesUpdateInterval

Minimal time, in seconds, between active tiles set update

Protected variable

TMap< FNavAgent...

 

AgentToNavDataMap

Protected variable

TArray< FAsyncP...

 

AsyncPathFindingCompletedQueries

Queued async pathfinding results computed by the dedicated task in the last frame and ready to dispatch in the next update.

Protected variable

TArray< FAsyncP...

 

AsyncPathFindingQueries

Queued async pathfinding queries to process in the next update.

Protected variable

FGraphEventRef

 

AsyncPathFindingTask

Graph event that the main thread will wait for to synchronize with the async pathfinding task, if any.

Protected variable

TAtomic< bool >

 

bAbortAsyncQueriesRequested

Flag used by main thread to ask the async pathfinding task to stop and postpone remaining queries, if any.

Protected variable

uint32: 1

 

bAllowClientSideNavigation

If false, will not create nav collision when connecting as a client

Protected variable

uint8: 1

 

bAsyncBuildPaused

Protected variable

uint32: 1

 

bAutoCreateNavigationData

Should navigation system spawn default Navigation Data when there's none and there are navigation bounds present?

Protected variable

uint8: 1

 

bCleanUpDone

Set when the NavSys instance has been cleaned up. This is an irreversible state

Protected variable

uint32: 1

 

bGenerateNavigationOnlyAroundNavigationInvokers

If set to true navigation will be generated only around registered "navigation enforcers" This has a range of consequences (including how navigation octree operates) so it needs to be a conscious decision.

Public variable

uint32: 1

 

bInitialBuildingLocked

If set to true will result navigation system not rebuild navigation until a call to ReleaseInitialBuildingLock() is called.

Protected variable

uint8: 1

 

bInitialLevelsAdded

Protected variable

uint8: 1

 

bInitialSetupHasBeenPerformed

Protected variable

uint32: 1

 

bShouldDiscardSubLevelNavData

If true, games should ignore navigation data inside loaded sublevels

Public variable

uint32: 1

 

bSkipAgentHeightCheckWhenPickingNavData

False by default, if set to true will result in not caring about nav agent height when trying to match navigation data to passed in nav agent

Protected variable

uint32: 1

 

bSpawnNavDataInNavBoundsLevel

If true will try to spawn the navigation data instance in the sublevel with navigation bounds, if false it will spawn in the persistent level

Protected variable

uint32: 1

 

bSupportRebuilding

Gets set to true if gathering navigation data (like in navoctree) is required due to the need of navigation generation Is always true in Editor Mode.

Protected variable

uint32: 1

 

bTickWhilePaused

If true, will update navigation even when the game is paused

Public variable

uint32: 1

 

bWholeWorldNavigable

If set to true (default) navigation will be generated only within special navigation bounds volumes (like ANavMeshBoundsVolume).

Protected variable

uint8: 1

 

bWorldInitDone

Protected variable

TSoftClassPtr< ...

 

CrowdManagerClass

Protected variable

int32

 

CurrentlyDrawnNavDataIndex

Indicates which of multiple navigation data instances to draw

Protected variable

TMap< uint32, F...

 

CustomLinksMap

Map of all custom navigation links, that are relevant for path following

Protected variable

ENavDataGatheri...

 

DataGatheringMode

Sets how navigation data should be gathered when building collision information

Protected variable

FName

 

DefaultAgentName

If not None indicates which of navigation datas and supported agents are going to be used as the default ones.

Protected variable

FNavigationDirt...

 

DefaultDirtyAreasController

Protected variable

FNavigationOctr...

 

DefaultOctreeController

Protected variable

float

 

DirtyAreaWarningSizeThreshold

-1 by default, if set to a positive value dirty areas with any dimensions in 2d over the threshold created at runtime will be logged

Protected variable

FDelegateHandle

 

HotReloadDelegateHandle

Protected variable

uint8

 

InitialNavBuildingLockFlags

Set of locking flags applied on startup of navigation system

Public variable

ANavigationData...

 

MainNavData

Protected variable

TSet< const UCl...

 

NavAreaClasses

Protected variable

uint8

 

NavBuildingLockFlags

Protected variable

FCriticalSectio...

 

NavDataRegistration

Public variable

TArray< ANaviga...

 

NavDataRegistrationQueue

Protected variable

FCriticalSectio...

 

NavDataRegistrationSection

Async queries

Public variable

TArray< ANaviga...

 

NavDataSet

Protected variable

FBox

 

NavigableWorldBounds

Cached navigable world bounding box

Protected variable

FNavRegenTimeSl...

 

NavRegenTimeSliceManager

Protected variable

uint8

 

NavUpdateLockFlags

Public variable

FOnNavDataGener...

 

OnNavDataRegisteredEvent

Public variable

FOnNavDataGener...

 

OnNavigationGenerationFinishedDelegate

Public variable

FOnNavigationIn...

 

OnNavigationInitDone

Protected variable

FNavigationSyst...

 

OperationMode

Public variable

TArray< FNaviga...

 

PendingNavBoundsUpdates

List of pending navigation bounds update requests (add, remove, update size)

Protected variable

TSet< FNavigati...

 

RegisteredNavBounds

All areas where we build/have navigation

Protected variable

TArray< FNavDat...

 

SupportedAgents

List of agents types supported by this navigation system

Protected variable

FNavAgentSelect...

 

SupportedAgentsMask

NavigationSystem's properties in Project Settings define all possible supported agents, but a specific navigation system can choose to support only a subset of agents.

Constructors

Name Description

Public function

UNavigationSystemV1

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Name Description

Public function Virtual

~UNavigationSystemV1()

Functions

Name Description

Public function

void

 

AbortAsyncFindPathRequest

(
    uint32 AsynPathQueryID
)

Removes query indicated by given ID from queue of path finding requests to process.

Protected function

void

 

AddAsyncQuery

(
    const FAsyncPathFindingQuery& Quer...
)

Adds given request to requests queue.

it's to be called only on game thread only

Public function

void

 

AddDirtyArea

(
    const FBox& NewArea,
    int32 Flags
)

Public function

void

 

AddDirtyAreas

(
    const TArray< FBox >& NewAreas,
    int32 Flags
)

Protected function

void

 

AddElementToNavOctree

(
    const FNavigationDirtyElement& Dir...
)

Adds given element to NavOctree.

Protected function

void

 

AddLevelCollisionToOctree

(
    ULevel* Level
)

Add BSP collision data to navigation octree

Protected function Virtual

void

 

AddLevelToOctree

(
    ULevel& Level
)

Called during ConditionalPopulateNavOctree and gives subclassess a chance to influence what gets added

Protected function

void

 

AddNavigationBounds

(
    const FNavigationBounds& NewBounds
)

Adds data to RegisteredNavBounds

Protected function

void

 

AddNavigationBoundsUpdateRequest

(
    const FNavigationBoundsUpdateReques...
)

Adds navigation bounds update request to a pending list

Public function

void

 

AddNavigationBuildLock

(
    uint8 Flags
)

Public function

void

 

AddNavigationUpdateLock

(
    uint8 Flags
)

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Protected function

void

 

ApplySupportedAgentsFilter()

Public function Virtual

void

 

Build()

Building

Protected function

void

 

CalcTimeSlicedUpdateData

(
    TArray< double >& OutCurrentTimeSl...,
    TArray< bool >& OutIsTimeSlicingAr...,
    bool& bOutAnyNonTimeSlicedGenerato...,
    int32& OutNumTimeSlicedRemainingBu...
)

Public function Virtual

void

 

CancelBuild()

Cancels all currently running navigation builds

Public function Const

bool

 

CanRebuildDirtyNavigation()

Checks if dirty navigation data can rebuild itself

Public function Static

void

 

ClearNavOctreeAll

(
    AActor* Actor
)

Removes all navoctree entries for actor and its components

Protected function Virtual

bool

 

ConditionalPopulateNavOctree()

Called in places where we need to spawn the NavOctree, but is checking additional conditions if we really want to do that depending on navigation data setup among others

Public function Static

void

 

ConfigureAsStatic

(
    bool bEnableStatic
)

Call with bEnableStatic == true to signal the NavigationSystem it doesn't need to store any navigation-generation-related data at game runtime, because nothing is going to use it anyway.

Protected function Virtual

void

 

ConstructNavOctree()

Called to instantiate NavigationSystem's NavOctree instance

Protected function Virtual

void

 

CreateCrowdManager()

Spawn new crowd manager

Public function Const

FSharedNavQu...

 

CreateDefaultQueryFilterCopy()

Public function Virtual

ANavigationD...

 

CreateNavigationDataInstanceInLevel

(
    const FNavDataConfig& NavConfig,
    ULevel* SpawnLevel
)

Constructs a navigation data instance of specified NavDataClass, in passed Level for supplied NavConfig.

Public function Static

UNavigationS...

 

CreateNavigationSystem

(
    UWorld* WorldOwner
)

Public function

void

 

CycleNavigationDataDrawn()

Debug

Public function

void

 

DemandLazyDataGathering

(
    FNavigationRelevantData& ElementDa...
)

Public function Const

void

 

DescribeFilterFlags

(
    const TArray< FString >& FlagsDesc
)

Prepare descriptions of navigation flags in UNavigationQueryFilter class: using array

Public function Const

void

 

DescribeFilterFlags

(
    UEnum* FlagsEnum
)

Filters.

Protected function Virtual

void

 

DestroyNavOctree()

Protected function Const

void

 

DispatchAsyncQueriesResults

(
    const TArray< FAsyncPathFindingQuer...
)

Broadcasts completion delegate for all completed async pathfinding requests.

Public function Static

bool

 

DoesPathIntersectBox

(
    const FNavigationPath* Path,
    const FBox& Box,
    const FVector& AgentLocation,
    uint32 StartingIndex,
    FVector* AgentExtent
)

Public function Static

bool

 

DoesPathIntersectBox

(
    const FNavigationPath* Path,
    const FBox& Box,
    uint32 StartingIndex,
    FVector* AgentExtent
)

Protected function Virtual

void

 

DoInitialSetup()

Sets up SuportedAgents and NavigationDataCreators.

Protected function

uint8

 

FillInstantiatedDataMask

(
    TBitArray<>& OutInstantiatedMask,
    ULevel* InLevel
)

Fills a mask indicating which navigation data associated to the supported agent mask are already instantiated.

Public function

void

 

FindElementsInNavOctree

(
    const FBox& QueryBox,
    const FNavigationOctreeFilter& Fil...,
    TArray< FNavigationOctreeElement > ...
)

Find all elements in navigation octree within given box (intersection)

Public function

uint32

 

FindPathAsync

(
    const FNavAgentProperties& AgentPr...,
    FPathFindingQuery Query,
    const FNavPathQueryDelegate& Resul...,
    EPathFindingMode::Type Mode
)

Asynchronously looks for a path from to for agent with properties .

Public function

FPathFinding...

 

FindPathSync

(
    FPathFindingQuery Query,
    EPathFindingMode::Type Mode
)

Does a simple path finding from to on specified NavData.

Public function

FPathFinding...

 

FindPathSync

(
    const FNavAgentProperties& AgentPr...,
    FPathFindingQuery Query,
    EPathFindingMode::Type Mode
)

Synchronously looks for a path from to for agent with properties .

Public function Static

UNavigationP...

 

FindPathToActorSynchronously

(
    UObject* WorldContextObject,
    const FVector& PathStart,
    AActor* GoalActor,
    float TetherDistance,
    AActor* PathfindingContext,
    TSubclassOf< UNavigationQueryFilter...
)

Finds path instantly, in a FindPath Synchronously.

Public function Static

UNavigationP...

 

FindPathToLocationSynchronously

(
    UObject* WorldContextObject,
    const FVector& PathStart,
    const FVector& PathEnd,
    AActor* PathfindingContext,
    TSubclassOf< UNavigationQueryFilter...
)

Finds path instantly, in a FindPath Synchronously.

Protected function Virtual

void

 

GatherNavigationBounds()

Searches for all valid navigation bounds in the world and stores them

Public function Const

ANavigationD...

 

GetAbstractNavData()

Protected function Static

int32

 

GetAllAttachedActors

(
    const AActor& RootActor,
    TArray< AActor* >& OutAttache...
)

A helper function that gathers all actors attached to RootActor and fetches them back.

Public function Const

UCrowdManage...

 

GetCrowdManager()

Public function Static

UNavigationS...

 

GetCurrent

(
    UObject* WorldContextObject
)

Public function Static

UNavigationS...

 

GetCurrent

(
    UWorld* World
)

Public function Const

INavLinkCust...

 

GetCustomLink

(
    uint32 UniqueLinkId
)

Find custom link by unique ID

Public function Const

const FNavig...

 

GetDataForObject

(
    const UObject& Object
)

Public function

ANavigationD...

 

GetDefaultNavDataInstance

Returns the world default navigation data instance. Creates one if it doesn't exist.

Public function Const

ANavigationD...

 

GetDefaultNavDataInstance()

Public function Static

const FNavDa...

 

GetDefaultSupportedAgent()

Public function Const

const FNavDa...

 

GetDefaultSupportedAgentConfig()

Public function Const

const TArray...

 

GetInvokerLocations()

Public function Virtual Const

bool

 

GetIsAutoUpdateEnabled()

Checks if auto-rebuilding navigation data is enabled.

Public function Const

FBox

 

GetLevelBounds

(
    ULevel* InLevel
)

Public function Const

ANavigationD...

 

GetMainNavDataChecked()

Public function

FNavigationR...

 

GetMutableDataForObject

(
    const UObject& Object
)

Public function

FNavigationO...

 

GetMutableNavOctree()

Public function

FNavRegenTim...

 

GetMutableNavRegenTimeSliceManager()

Public function Const

void

 

GetNavAgentPropertiesArray

(
    TArray< FNavAgentProperties >& Out...
)

Fetch the array of all nav-agent properties.

Public function Static

INavigationD...

 

GetNavDataForActor

(
    const AActor& Actor
)

Public function Virtual Const

ANavigationD...

 

GetNavDataForAgentName

(
    const FName AgentName
)

Goes through all registered NavigationData instances and retrieves the one supporting agent named AgentName

Public function Virtual Const

ANavigationD...

 

GetNavDataForProps

(
    const FNavAgentProperties& AgentPr...,
    const FVector& AgentLocation,
    const FVector& Extent
)

Looks up NavData appropriate for specified movement properties and returns it.

Public function Virtual

ANavigationD...

 

GetNavDataForProps

(
    const FNavAgentProperties& AgentPr...
)

Looks for NavData generated for specified movement properties and returns it. NULL if not found;

Public function Virtual Const

const ANavig...

 

GetNavDataForProps

(
    const FNavAgentProperties& AgentPr...
)

Looks for NavData generated for specified movement properties and returns it.

Protected function Const

ANavigationD...

 

GetNavDataWithID

(
    const uint16 NavDataID
)

It looks only through registered navigation data

Public function Const

const TSet< ...

 

GetNavigationBounds()

Public function Virtual Const

int

 

GetNavigationBoundsForNavData

(
    const ANavigationData& NavData,
    TArray< FBox >& OutBounds,
    ULevel* InLevel
)

Public function Static

UNavigationS...

 

GetNavigationSystem

(
    UObject* WorldContextObject
)

Blueprint functions.

Public function Const

const FNavig...

 

GetNavOctree()

Protected function

bool

 

GetNavOctreeElementData

(
    const UObject& NodeOwner,
    int32& DirtyFlags,
    FBox& DirtyBounds
)

Read element data from navigation octree

Public function Const

int32

 

GetNumDirtyAreas()

Public function Const

int32

 

GetNumRemainingBuildTasks()

Used to display "navigation building in progress" counter

Public function Const

int32

 

GetNumRunningBuildTasks()

Number of currently running tasks

Public function Const

const FOctre...

 

GetObjectsNavOctreeId

(
    const UObject& Object
)

Public function

void

 

GetOnScreenMessages

Public function Static

ENavigationQ...

 

GetPathCost

(
    UObject* WorldContextObject,
    const FVector& PathStart,
    const FVector& PathEnd,
    float& PathCost,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

Potentially expensive.

Public function Const

ENavigationQ...

 

GetPathCost

(
    const FVector& PathStart,
    const FVector& PathEnd,
    float& PathCost,
    const ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Calculates a path from PathStart to PathEnd and retrieves its cost.

Public function Static

ENavigationQ...

 

GetPathLength

(
    UObject* WorldContextObject,
    const FVector& PathStart,
    const FVector& PathEnd,
    float& PathLength,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

Potentially expensive. Use with caution

Public function Const

ENavigationQ...

 

GetPathLength

(
    const FVector& PathStart,
    const FVector& PathEnd,
    float& PathLength,
    const ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Calculates a path from PathStart to PathEnd and retrieves its overestimated length.

Public function Const

ENavigationQ...

 

GetPathLengthAndCost

(
    const FVector& PathStart,
    const FVector& PathEnd,
    float& PathLength,
    float& PathCost,
    const ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Calculates a path from PathStart to PathEnd and retrieves its overestimated length and cost.

Public function

bool

 

GetRandomPoint

(
    FNavLocation& ResultLocation,
    ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Finds random point in navigable space

Public function Const

bool

 

GetRandomPointInNavigableRadius

(
    const FVector& Origin,
    float Radius,
    FNavLocation& ResultLocation,
    ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Finds random, point in navigable space restricted to Radius around Origin.

Public function Const

bool

 

GetRandomReachablePointInRadius

(
    const FVector& Origin,
    float Radius,
    FNavLocation& ResultLocation,
    ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Finds random, reachable point in navigable space restricted to Radius around Origin

Public function Const

FNavigationS...

 

GetRunMode()

Protected function Const

ERuntimeGene...

 

GetRuntimeGenerationType()

Return "Strongest" runtime generation type required by registered navigation data objects Depends on runtime generation settings of each navigation data, always ERuntimeGenerationType::Dynamic in the editor world

Public function Const

int32

 

GetSupportedAgentIndex

(
    const ANavigationData* NavData
)

Find index in SupportedAgents array for given navigation data

Public function Const

int32

 

GetSupportedAgentIndex

(
    const FNavAgentProperties& NavAgen...
)

Find index in SupportedAgents array for agent type

Public function Const

const TArray...

 

GetSupportedAgents()

Public function Const

FNavAgentSel...

 

GetSupportedAgentsMask()

Public function Const

UWorld *

 

GetWorld()

Public function Const

FBox

 

GetWorldBounds()

Public function

bool

 

HandleCountNavMemCommand()

Public function

bool

 

HandleCycleNavDrawnCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Exec command handlers

Public function Const

bool

 

HasDirtyAreasQueued()

Public function Static

uint32

 

HashObject

(
    const UObject& Object
)

Public function Const

bool

 

HasPendingObjectNavOctreeId

(
    UObject* Object
)

Public function

void

 

InitializeLevelCollisions()

Adds BSP collisions of currently streamed in levels to octree

Public function Const

bool

 

IsActiveTilesGenerationEnabled()

Public function Const

bool

 

IsInitialized()

Public function Static

bool

 

IsNavigationBeingBuilt

(
    UObject* WorldContextObject
)

Public function Static

bool

 

IsNavigationBeingBuiltOrLocked

(
    UObject* WorldContextObject
)

Public function Const

bool

 

IsNavigationBuildingLocked

(
    uint8 Flags
)

Public function Const

bool

 

IsNavigationBuildingPermanentlyLocked()

Check if building is permanently locked to avoid showing navmesh building notify (due to queued dirty areas)

Public function

bool

 

IsNavigationBuildInProgress()

Determines whether any generator is performing navigation building actions at the moment, dirty areas are also checked

Public function Const

bool

 

IsNavigationDirty()

Checks if navigation/navmesh is dirty and needs to be rebuilt

Public function Const

bool

 

IsNavigationOctreeLocked()

Check if navigation octree updates are currently ignored

Public function Const

bool

 

IsNavigationRegisterLocked()

Public function Const

bool

 

IsNavigationRelevant

(
    const AActor* TestActor
)

Public function Static

bool

 

IsNavigationSystemStatic()

Public function Const

bool

 

IsNavigationUnregisterLocked()

Public function Const

bool

 

IsNavigationUpdateLocked()

Public function Const

bool

 

IsSetUpForLazyGeometryExporting()

Public function Virtual Const

bool

 

IsThereAnywhereToBuildNavigation()

Public function Static

bool

 

K2_GetRandomLocationInNavigableRadius

(
    UObject* WorldContextObject,
    const FVector& Origin,
    FVector& RandomLocation,
    float Radius,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

Generates a random location in navigable space within given radius of Origin.

Public function Static

bool

 

K2_GetRandomReachablePointInRadius

(
    UObject* WorldContextObject,
    const FVector& Origin,
    FVector& RandomLocation,
    float Radius,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

Generates a random location reachable from given Origin location.

Public function Static

bool

 

K2_ProjectPointToNavigation

(
    UObject* WorldContextObject,
    const FVector& Point,
    FVector& ProjectedLocation,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...,
    const FVector QueryExtent
)

Project a point onto the NavigationData

Public function

bool

 

K2_ReplaceAreaInOctreeData

(
    const UObject* Object,
    TSubclassOf< UNavArea > OldArea,
    TSubclassOf< UNavArea > NewArea
)

Protected function

void

 

LogNavDataRegistrationResult

Public function Static

bool

 

NavigationRaycast

(
    UObject* WorldContextObject,
    const FVector& RayStart,
    const FVector& RayEnd,
    FVector& HitLocation,
    TSubclassOf< UNavigationQueryFilter...,
    AController* Querier
)

Performs navigation raycast on NavigationData appropriate for given Querier.

Protected function

void

 

OnActorMoved

(
    AActor* Actor
)

Delegate handler for ActorMoved events

Public function Static

void

 

OnActorRegistered

(
    AActor* Actor
)

Public function Static

void

 

OnActorUnregistered

(
    AActor* Actor
)

Protected function Virtual

void

 

OnBeginTearingDown

(
    UWorld* World
)

Called as part of UWorld::BeginTearingDown

Public function Static

void

 

OnComponentRegistered

(
    UActorComponent* Comp
)

Navigation octree related functions

Public function Static

void

 

OnComponentUnregistered

(
    UActorComponent* Comp
)

Protected function Virtual

void

 

OnHotReload

(
    bool bWasTriggeredAutomatically
)

Called to notify NavigaitonSystem about finished hot reload

Protected function

void

 

OnLevelAddedToWorld

(
    ULevel* InLevel,
    UWorld* InWorld
)

Handler for FWorldDelegates::LevelAddedToWorld event

Protected function

void

 

OnLevelRemovedFromWorld

(
    ULevel* InLevel,
    UWorld* InWorld
)

Handler for FWorldDelegates::LevelRemovedFromWorld event

Protected function

void

 

OnNavigationAreaEvent

(
    UClass* AreaClass,
    ENavAreaEvent::Type Event
)

Public function Virtual

void

 

OnNavigationBoundsAdded

(
    ANavMeshBoundsVolume* NavVolum...
)

Public function Virtual

void

 

OnNavigationBoundsRemoved

(
    ANavMeshBoundsVolume* NavVolum...
)

Public function

void

 

OnNavigationBoundsUpdated

(
    ANavMeshBoundsVolume* NavVolum...
)

Protected function

void

 

OnNavigationDirtied

(
    const FBox& Bounds
)

Delegate handler called when navigation is dirtied

Public function Virtual

void

 

OnNavigationGenerationFinished

(
    ANavigationData& NavData
)

Public function

void

 

OnPIEEnd()

Public function

void

 

OnPIEStart()

Protected function

void

 

OnPostLoadMap

(
    UWorld* LoadedWorld
)

Delegate handler for PostLoadMap event

Public function Virtual

void

 

OnWorldInitDone

(
    FNavigationSystemRunMode Mode
)

Protected function

void

 

OnWorldPostActorTick

(
    UWorld* World,
    ELevelTick TickType,
    float DeltaTime
)

Handler for FWorldDelegates::OnWorldPostActorTick event

Public function

void

 

OverrideSupportedAgents

(
    const TArray< FNavDataConfig >& Ne...
)

Protected function

void

 

PerformAsyncQueries

(
    TArray< FAsyncPathFindingQuery > Pa...
)

Processes pathfinding requests given in PathFindingQueries.

Protected function

void

 

PerformNavigationBoundsUpdate

(
    const TArray< FNavigationBoundsUpda...
)

Used to apply updates of nav volumes in navigation system's tick

Protected function

void

 

PostponeAsyncQueries()

Requests the async pathfinding task to abort and waits for it to complete before resuming the main thread.

Protected function

void

 

ProcessCustomLinkPendingRegistration()

Registers CustomLinks awaiting registration in PendingCustomLinkRegistration

Protected function Virtual

void

 

ProcessRegistrationCandidates()

Processes registration of candidates queues via RequestRegistration and stored in NavDataRegistrationQueue

Public function

bool

 

ProjectPointToNavigation

(
    const FVector& Point,
    FNavLocation& OutLocation,
    const FVector& Extent,
    const FNavAgentProperties* Age...,
    FSharedConstNavQueryFilter QueryFil...
)

Public function Const

bool

 

ProjectPointToNavigation

(
    const FVector& Point,
    FNavLocation& OutLocation,
    const FVector& Extent,
    const ANavigationData* NavData,
    FSharedConstNavQueryFilter QueryFil...
)

Protected function Virtual

void

 

RebuildAll

(
    bool bIsLoadTime
)

Triggers navigation building on all eligible navigation data.

Protected function Virtual

void

 

RebuildDirtyAreas

(
    float DeltaSeconds
)

Public function Virtual

void

 

RegisterCustomLink

(
    INavLinkCustomInterface& CustomLin...
)

Custom navigation links.

Public function Virtual

void

 

RegisterInvoker

(
    AActor& Invoker,
    float TileGenerationRadius,
    float TileRemovalRadius
)

Active tiles.

Protected function

void

 

RegisterNavAreaClass

(
    UClass* NavAreaClass
)

Tries to register navigation area

Protected function Virtual

ERegistratio...

 

RegisterNavData

(
    ANavigationData* NavData
)

Registers given navigation data with this Navigation System.

Protected function

void

 

RegisterNavigationDataInstances()

Processes all NavigationData instances in UWorld owning navigation system instance, and registers all previously unregistered

Public function Static

void

 

RegisterNavigationInvoker

(
    AActor& Invoker,
    float TileGenerationRadius,
    float TileRemovalRadius
)

Public function

void

 

RegisterNavigationInvoker

(
    AActor* Invoker,
    float TileGenerationRadius,
    float TileRemovalRadius
)

Registers given actor as a "navigation enforcer" which means navigation system will make sure navigation is being generated in specified radius around it.

Protected function

FSetElementI...

 

RegisterNavOctreeElement

(
    UObject* ElementOwner,
    INavRelevantInterface* Element...,
    int32 UpdateFlags
)

Public function Virtual

void

 

ReleaseInitialBuildingLock()

Protected function

void

 

RemoveLevelCollisionFromOctree

(
    ULevel* Level
)

Remove BSP collision data from navigation octree

Public function

void

 

RemoveNavigationBuildLock

(
    uint8 Flags,
    const ELockRemovalRebuildAction Reb...
)

Public function

void

 

RemoveNavigationUpdateLock

(
    uint8 Flags
)

Public function

void

 

RemoveNavOctreeElementId

(
    const FOctreeElementId2& ElementId,
    int32 UpdateFlags
)

Public function

void

 

RemoveObjectsNavOctreeId

(
    const UObject& Object
)

Public function

bool

 

ReplaceAreaInOctreeData

(
    const UObject& Object,
    TSubclassOf< UNavArea > OldArea,
    TSubclassOf< UNavArea > NewArea,
    bool bReplaceChildClasses
)

Fetched Object's data from the octree and replaces occurences of OldArea with NewArea

Public function Static

void

 

RequestAreaRegistering

(
    UClass* NavAreaClass
)

Areas.

Public function Static

void

 

RequestAreaUnregistering

(
    UClass* NavAreaClass
)

Public function Static

void

 

RequestCustomLinkRegistering

(
    INavLinkCustomInterface& CustomLin...,
    UObject* OwnerOb
)

Public function Static

void

 

RequestCustomLinkUnregistering

(
    INavLinkCustomInterface& CustomLin...,
    UObject* ObjectOb
)

Public function Virtual

void

 

RequestRegistrationDeferred

(
    ANavigationData& NavData
)

Adds NavData to registration candidates queue - NavDataRegistrationQueue

Protected function Const

bool

 

RequiresNavOctree()

Whether Navigation system needs to populate nav octree.

Public function

void

 

ResetCachedFilter

Removes cached filters from currently registered navigation data

Public function

void

 

ResetMaxSimultaneousTileGenerationJobsCount()

Brings limit of simultaneous navmesh tile generation jobs back to Project Setting's default value

Protected function

void

 

SetCrowdManager

(
    UCrowdManagerBase* NewCrowdMan...
)

Public function

void

 

SetGeometryGatheringMode

(
    ENavDataGatheringModeConfig NewMode
)

Public function

void

 

SetMaxSimultaneousTileGenerationJobsCount

(
    int32 MaxNumberOfJobs
)

Will limit the number of simultaneously running navmesh tile generation jobs to specified number.

Public function Static

void

 

SetNavigationAutoUpdateEnabled

(
    bool bNewEnable,
    UNavigationSystemBase* InNavig...
)

Allow editor to toggle whether seamless navigation building is enabled

Public function

void

 

SetNavigationOctreeLock

(
    bool bLock
)

Public function

void

 

SetSupportedAgentsMask

(
    const FNavAgentSelector& InSupport...
)

Protected function

void

 

SetSupportedAgentsNavigationClass

(
    int32 AgentIndex,
    TSubclassOf< ANavigationData > Navi...
)

Used to properly set navigation class for indicated agent and propagate information to other places (like project settings) that may need this information

Public function Static

void

 

SetUpdateNavOctreeOnComponentChange

(
    bool bNewUpdateOnComponentChange
)

Public function Const

bool

 

ShouldAllowClientSideNavigation()

Public function Virtual Const

bool

 

ShouldDiscardSubLevelNavData

(
    ANavigationData* NavData
)

Public function Const

bool

 

ShouldGenerateNavigationEverywhere()

Public function Const

bool

 

ShouldGeneratorRun

(
    const FNavDataGenerator* Gener...
)

Super-hacky safety feature for threaded navmesh building.

Public function Virtual Const

bool

 

ShouldLoadNavigationOnClient

(
    ANavigationData* NavData
)

Public function Static

bool

 

ShouldUpdateNavOctreeOnComponentChange()

Protected function Virtual

void

 

SpawnMissingNavigationData()

Protected function

void

 

SpawnMissingNavigationDataInLevel

(
    const TBitArray<>& InInstantiatedM...,
    ULevel* InLevel
)

Spawns missing navigation data.

Public function Const

bool

 

SupportsNavigationGeneration()

Public function Const

bool

 

TestPathSync

(
    FPathFindingQuery Query,
    EPathFindingMode::Type Mode,
    int32* NumVisitedNodes
)

Synchronously check if path between two points exists Does not return path object, but will run faster (especially in hierarchical mode)

Protected function

void

 

TriggerAsyncQueries

(
    TArray< FAsyncPathFindingQuery >& ...
)

Spawns a non-game-thread task to process requests given in PathFindingQueries.

Public function

void

 

UnregisterCustomLink

(
    INavLinkCustomInterface& CustomLin...
)

Public function Virtual

void

 

UnregisterInvoker

(
    AActor& Invoker
)

Protected function

void

 

UnregisterNavAreaClass

(
    UClass* NavAreaClass
)

Tries to unregister navigation area

Public function Virtual

void

 

UnregisterNavData

(
    ANavigationData* NavData
)

Bookkeeping.

Public function

void

 

UnregisterNavigationInvoker

(
    AActor* Invoker
)

Removes given actor from the list of active navigation enforcers.

Public function Static

void

 

UnregisterNavigationInvoker

(
    AActor& Invoker
)

Protected function

void

 

UnregisterNavOctreeElement

(
    UObject* ElementOwner,
    INavRelevantInterface* Element...,
    int32 UpdateFlags
)

Public function Virtual

void

 

UnregisterUnusedNavData()

Traverses SupportedAgents and for all agents not supported (i.e. filtered out by SupportedAgentsMask) checks if there's a currently registered NavigationData instance for that agent, and if so it unregisters that agent

Protected function Virtual

void

 

UpdateAbstractNavData()

Find or create abstract nav data

Public function Static

void

 

UpdateActorAndComponentsInNavOctree

(
    AActor& Actor,
    bool bUpdateAttachedActors
)

Update all navoctree entries for actor and its components

Public function Static

void

 

UpdateActorInNavOctree

(
    AActor& Actor
)

Update navoctree entry for specified actor/component

Protected function Static

void

 

UpdateAttachedActorsInNavOctree

(
    AActor& RootActor
)

Updates navoctree information on actors attached to RootActor

Public function Static

void

 

UpdateComponentInNavOctree

(
    UActorComponent& Comp
)

Public function

void

 

UpdateCustomLink

(
    const INavLinkCustomInterface*...
)

Updates custom link for all active navigation data instances

Public function

void

 

UpdateLevelCollision

(
    ULevel* InLevel
)

Public function Static

void

 

UpdateNavOctreeAfterMove

(
    USceneComponent* Comp
)

Update all navoctree entries for actor and its non scene components after root movement

Public function Static

void

 

UpdateNavOctreeBounds

(
    AActor* Actor
)

Updates bounds of all components implementing INavRelevantInterface

Public function

void

 

UpdateNavOctreeElement

(
    UObject* ElementOwner,
    INavRelevantInterface* Element...,
    int32 UpdateFlags
)

Update single element in navoctree

Public function

bool

 

UpdateNavOctreeElementBounds

(
    UActorComponent* Comp,
    const FBox& NewBounds,
    const FBox& DirtyArea
)

Update component bounds in navigation octree and mark only specified area as dirty, doesn't re-export component geometry

Public function

void

 

UpdateNavOctreeParentChain

(
    UObject* ElementOwner,
    bool bSkipElementOwnerUpdate
)

Force updating parent node and all its children

Public function

void

 

VerifyNavigationRenderingComponents

(
    const bool bShow
)

New stuff

Overridden from UNavigationSystemBase

Name Description

Public function Virtual

void

 

AppendConfig

(
    const UNavigationSystemConfig& New...
)

Called when there's a need to extend current navigation system's config with information in NewConfig

Public function Virtual

void

 

ApplyWorldOffset

(
    const FVector& InOffset,
    bool bWorldShift
)

Public function Virtual

void

 

CleanUp

(
    const FNavigationSystem::ECleanupMo...
)

Called upon UWorld destruction to release what needs to be released

Public function Virtual

void

 

Configure

(
    const UNavigationSystemConfig& Con...
)

Public function Virtual Const

INavigationD...

 

GetMainNavData()

Returns the world default navigation data instance.

Public function Virtual

void

 

InitializeForWorld

(
    UWorld& World,
    FNavigationSystemRunMode Mode
)

Public function Virtual Const

bool

 

IsNavigationBuilt

(
    const AWorldSettings* Settings
)

Public function Virtual

void

 

OnInitializeActors()

Called when owner-UWorld initializes actors

Public function Virtual

void

 

Tick

(
    float DeltaSeconds
)

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent& Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Enums

Typedefs

Name

Description

FOnNavigationDirty

Delegate type for events that dirty the navigation data ( Params: const FBox& DirtyBounds )

Constants

Name

Description

bIsPIEActive

bNavigationAutoUpdateEnabled

Whether seamless navigation building is enabled

bStaticRuntimeNavigation

bUpdateNavOctreeOnComponentChange

CustomLinkRegistrationSection

ExecHandler

Self-registering exec command to handle nav sys console commands

NavigationDirtyEvent

Called after navigation influencing event takes place

PendingCustomLinkRegistration

Deprecated Variables

Name Description

Public variable

uint8: 1

 

bCanAccumulateDirtyAreas

This member is deprecated and no longer used. Please access DirtyAreasController instead

Public variable

uint8: 1

 

bDirtyAreasReportedWhileAccumulationLocked

This member is deprecated and no longer used. Please access DirtyAreasController instead

Public variable

uint8: 1

 

bNavOctreeLock

This member is deprecated and no longer used. Please access OctreeController instead

Public variable

TArray< FNaviga...

 

DirtyAreas

This member is deprecated and no longer used. Please access DirtyAreasController instead

Public variable

float

 

DirtyAreasUpdateFreq

This member is deprecated and no longer used. Please access DirtyAreasController instead

Public variable

float

 

DirtyAreasUpdateTime

This member is deprecated and no longer used. Please access DirtyAreasController instead

Public variable

TSharedPtr< FNa...

 

NavOctree

This member is deprecated and no longer used. Please access OctreeController instead

Public variable

TMap< uint32, F...

 

ObjectToOctreeId

This member is deprecated and no longer used. Please access OctreeController instead

Public variable

TMultiMap< UObj...

 

OctreeChildNodesMap

This member is deprecated and no longer used. Please access OctreeController instead

Public variable

TSet< FNavigati...

 

PendingOctreeUpdates

This member is deprecated and no longer used. Please access OctreeController instead

Deprecated Functions

Name Description

Public function Virtual

ANavigationD...

 

CreateNavigationDataInstance

(
    const FNavDataConfig& NavConfig
)

This function is deprecated. Please use CreateNavigationDataInstanceInLevel instead

Public function Static

TSubclassOf<...

 

GetDefaultObstacleArea()

UNavigationSystemV1::GetDefaultObstacleArea is deprecated. Use FNavigationSystem::GetDefaultObstacleArea instead

Public function Static

TSubclassOf<...

 

GetDefaultWalkableArea()

UNavigationSystemV1::GetDefaultWalkableArea is deprecated. Use FNavigationSystem::GetDefaultWalkableArea instead

Public function Static

FVector

 

GetRandomPointInNavigableRadius

(
    UObject* WorldContextObject,
    const FVector& Origin,
    float Radius,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

This version of GetRandomPointInNavigableRadius is deprecated. Please use the new version

Public function Static

FVector

 

GetRandomReachablePointInRadius

(
    UObject* WorldContextObject,
    const FVector& Origin,
    float Radius,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

This version of GetRandomReachablePointInRadius is deprecated. Please use the new version

Public function

bool

 

IsNavigationBuildInProgress

(
    bool bCheckDirtyToo
)

This function is deprecated. Please use IsNavigationBuildInProgress

Public function Static

bool

 

K2_GetRandomPointInNavigableRadius

(
    UObject* WorldContextObject,
    const FVector& Origin,
    FVector& RandomLocation,
    float Radius,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...
)

This version is deprecated. Please use GetRandomLocationInNavigableRadius instead

Public function Static

FVector

 

ProjectPointToNavigation

(
    UObject* WorldContextObject,
    const FVector& Point,
    ANavigationData* NavData,
    TSubclassOf< UNavigationQueryFilter...,
    const FVector QueryExtent
)

This version of ProjectPointToNavigation is deprecated. Please use the new version

Public function

void

 

RemoveNavigationBuildLock

(
    uint8 Flags,
    bool bSkipRebuildInEditor
)

This version of RemoveNavigationBuildLock is deprecated. Please use the new version

Public function Virtual

void

 

RequestRegistration

(
    ANavigationData* NavData,
    bool bTriggerRegistrationProcessing
)

This version of RequestRegistration is deprecated. Please use the RequestRegistrationDeferred as the registration request is always queued now.

Public function

void

 

SetObjectsNavOctreeId

(
    const UObject& Object,
    FOctreeElementId2 Id
)

This function is deprecated and no longer used. NavigationSystem is no longer involved in storing navoctree element IDs. See FNavigationOctree for more details.

Public function Static

void

 

SimpleMoveToActor

(
    AController* Controller,
    const AActor* Goal
)

SimpleMoveToActor is deprecated. Use UAIBlueprintHelperLibrary::SimpleMoveToActor instead

Public function Static

void

 

SimpleMoveToLocation

(
    AController* Controller,
    const FVector& Goal
)

SimpleMoveToLocation is deprecated. Use UAIBlueprintHelperLibrary::SimpleMoveToLocation instead

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss