UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FNavigationElement Struct Reference

#include <NavigationElement.h>

+ Inheritance diagram for FNavigationElement:

Public Member Functions

ENGINE_API FNavigationElement (FPrivateToken, const UObject *Object, uint64 SubElementId)
 
 FNavigationElement ()=delete
 
ENGINE_API FNavigationElement (const UObject &Object, uint64 SubElementId=INDEX_NONE)
 
ENGINE_API FNavigationElement (const INavRelevantInterface &NavRelevant, uint64 SubElementId=INDEX_NONE)
 
 FNavigationElement (const UObject *Object, const uint64 SubElementId=INDEX_NONE)
 
TWeakObjectPtr< const UObjectGetWeakUObject () const
 
ENGINE_API FNavigationElementHandle GetHandle () const
 
const FTransformGetTransform () const
 
void SetTransform (const FTransform &InGeometryTransform)
 
FBox GetBounds () const
 
void SetBounds (const FBox &InBounds)
 
UBodySetupGetBodySetup () const
 
ENGINE_API void SetBodySetup (UBodySetup *InBodySetup)
 
const TWeakObjectPtr< const UObject > & GetNavigationParent () const
 
void SetNavigationParent (const UObject *InNavigationParent)
 
EHasCustomNavigableGeometry::Type GetGeometryExportType () const
 
void SetGeometryExportType (const EHasCustomNavigableGeometry::Type InCustomNavigableGeometry)
 
ENavDataGatheringMode GetGeometryGatheringMode () const
 
void SetGeometryGatheringMode (const ENavDataGatheringMode InGeometryGatheringMode)
 
bool GetDirtyAreaOnRegistration () const
 
void SetDirtyAreaOnRegistration (const bool bInDirtyAreaOnRegistration)
 
bool IsInBaseNavigationData () const
 
bool IsFromLevelVisibilityChange () const
 
ENGINE_API FString GetName () const
 
ENGINE_API FString GetPathName () const
 
ENGINE_API FString GetFullName () const
 
- Public Member Functions inherited from TSharedFromThis< FNavigationElement >
TSharedRef< FNavigationElement, Mode > AsShared ()
 
TSharedRef< FNavigationElement const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FNavigationElement, Mode > AsWeak ()
 
TWeakPtr< FNavigationElement const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static ENGINE_API TSharedRef< const FNavigationElementCreateFromNavRelevantInterface (const INavRelevantInterface &NavRelevantInterface)
 

Public Attributes

FNavigationDataExport NavigationDataExportDelegate
 
FCustomGeometryExport CustomGeometryExportDelegate
 
FGeometrySliceExport GeometrySliceExportDelegate
 

Friends

struct FNavigationDirtyElement
 
FString GetNameSafe (const FNavigationElement *Element)
 
FString GetPathNameSafe (const FNavigationElement *Element)
 
FString GetFullNameSafe (const FNavigationElement *Element)
 
ENGINE_API friend uint32 GetTypeHash (const FNavigationElement &Element)
 
ENGINE_API friend FString LexToString (const FNavigationElement &Element)
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< FNavigationElement >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< FNavigationElement >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

Structure registered in the navigation system that holds the required properties and delegates to gather navigation data (navigable geometry, NavArea modifiers, NavLinks, etc.) and be stored in the navigation octree.

It represents a single element spatially located in a defined area in the level. That element can be created to represent two use cases:

  1. Single UObject representing the navigation element constructed from a UObject raw or weak pointer
  2. Single UObject managing multiple non-UObject navigation elements constructed from a UObject raw or weak pointer and using the optional constructor parameter to identity a unique sub-element
    See also
    FNavigationElementHandle

Constructor & Destructor Documentation

◆ FNavigationElement() [1/5]

FNavigationElement::FNavigationElement ( FPrivateToken  ,
const UObject Object,
uint64  SubElementId 
)
explicit

◆ FNavigationElement() [2/5]

FNavigationElement::FNavigationElement ( )
delete

◆ FNavigationElement() [3/5]

FNavigationElement::FNavigationElement ( const UObject Object,
uint64  SubElementId = INDEX_NONE 
)
explicit

◆ FNavigationElement() [4/5]

FNavigationElement::FNavigationElement ( const INavRelevantInterface NavRelevant,
uint64  SubElementId = INDEX_NONE 
)
explicit

◆ FNavigationElement() [5/5]

FNavigationElement::FNavigationElement ( const UObject Object,
const uint64  SubElementId = INDEX_NONE 
)
inlineexplicit

Member Function Documentation

◆ CreateFromNavRelevantInterface()

TSharedRef< const FNavigationElement > FNavigationElement::CreateFromNavRelevantInterface ( const INavRelevantInterface NavRelevantInterface)
static

Factory helper function to create and initialize a sharable element from INavRelevantInterface.

◆ GetBodySetup()

UBodySetup * FNavigationElement::GetBodySetup ( ) const
inline
Returns
The associated body setup (if any) to use for the default geometry export.

◆ GetBounds()

FBox FNavigationElement::GetBounds ( ) const
inline
Returns
The bounds to use when registering the element in the navigation octree.

◆ GetDirtyAreaOnRegistration()

bool FNavigationElement::GetDirtyAreaOnRegistration ( ) const
inline
Returns
True the area covered by the navigation bounds should be dirtied when inserting, or removing, the element in the navigation octree (default behavior).
See also
DirtyAreaOnRegistration

◆ GetFullName()

FString FNavigationElement::GetFullName ( ) const
Returns
Name describing the element based on the associated UObject fullname and sub-element ID (if any).

◆ GetGeometryExportType()

EHasCustomNavigableGeometry::Type FNavigationElement::GetGeometryExportType ( ) const
inline
Returns
The type of geometry export to use for the current element
See also
EHasCustomNavigableGeometry

◆ GetGeometryGatheringMode()

ENavDataGatheringMode FNavigationElement::GetGeometryGatheringMode ( ) const
inline
Returns
The mode that indicates when the geometry gathering must be executed.
See also
GeometryGatheringMode

◆ GetHandle()

FNavigationElementHandle FNavigationElement::GetHandle ( ) const

Returns a handle that can be used to uniquely identify this element.

Returns
Handle representing the current element.

◆ GetName()

FString FNavigationElement::GetName ( ) const
Returns
Name describing the element based on the associated UObject name and sub-element ID (if any).

◆ GetNavigationParent()

const TWeakObjectPtr< const UObject > & FNavigationElement::GetNavigationParent ( ) const
inline
Returns
The UObject for which the associated octree node will be used to hold the current element navigation data.

◆ GetPathName()

FString FNavigationElement::GetPathName ( ) const
Returns
Name describing the element based on the associated UObject pathname and sub-element ID (if any).

◆ GetTransform()

const FTransform & FNavigationElement::GetTransform ( ) const
inline
Returns
Transform to use for the default geometry export.

◆ GetWeakUObject()

TWeakObjectPtr< const UObject > FNavigationElement::GetWeakUObject ( ) const
inline

Returns a weak pointer to the UObject associated with this navigation element.

Returns
Weak pointer to the associated UObject if any.
Note
If called from the Game thread all regular TWeakObjectPtr concerns and limitation applies.

◆ IsFromLevelVisibilityChange()

bool FNavigationElement::IsFromLevelVisibilityChange ( ) const
inline
Returns
True if the element was created from a UObject while its level was pending being made invisible or visible (i.e., loading/unloading).

◆ IsInBaseNavigationData()

bool FNavigationElement::IsInBaseNavigationData ( ) const
inline
Returns
True if the element was created from a UObject that is associated with a data layer in the list of runtime data layers that should be included in the base navigation data (cooked) or directly placed in the level.

◆ SetBodySetup()

void FNavigationElement::SetBodySetup ( UBodySetup InBodySetup)

Sets the body setup to use for the default geometry export.

◆ SetBounds()

void FNavigationElement::SetBounds ( const FBox InBounds)
inline

Sets the Bounds to use when registering the element in the navigation octree.

◆ SetDirtyAreaOnRegistration()

void FNavigationElement::SetDirtyAreaOnRegistration ( const bool  bInDirtyAreaOnRegistration)
inline

Sets whether the area covered by the navigation bounds should be dirtied when inserting, or removing, the element in the navigation octree (default behavior).

See also
DirtyAreaOnRegistration

◆ SetGeometryExportType()

void FNavigationElement::SetGeometryExportType ( const EHasCustomNavigableGeometry::Type  InCustomNavigableGeometry)
inline

Sets the type of geometry export to use for the current element

See also
GeometryExportType

◆ SetGeometryGatheringMode()

void FNavigationElement::SetGeometryGatheringMode ( const ENavDataGatheringMode  InGeometryGatheringMode)
inline

Sets the mode that indicates when the geometry gathering must be executed.

See also
GeometryGatheringMode

◆ SetNavigationParent()

void FNavigationElement::SetNavigationParent ( const UObject InNavigationParent)
inline

Sets the UObject for which the associated octree node will be used to hold the current element navigation data.

◆ SetTransform()

void FNavigationElement::SetTransform ( const FTransform InGeometryTransform)
inline

Sets the Transform to use for the default geometry export.

Friends And Related Symbol Documentation

◆ FNavigationDirtyElement

Temporary solution to provide access to deprecated constructors.

◆ GetFullNameSafe

FString GetFullNameSafe ( const FNavigationElement Element)
friend
Returns
Name describing the specified element based on the fullname of its associated UObject and sub-element ID (if any).

◆ GetNameSafe

FString GetNameSafe ( const FNavigationElement Element)
friend
Returns
Name describing the specified element based on the name of its associated UObject and sub-element ID (if any).

◆ GetPathNameSafe

FString GetPathNameSafe ( const FNavigationElement Element)
friend
Returns
Name describing the specified element based on the pathname of its associated UObject and sub-element ID (if any).

◆ GetTypeHash

ENGINE_API friend uint32 GetTypeHash ( const FNavigationElement Element)
friend

Hash function to use TSet/TMap

◆ LexToString

ENGINE_API friend FString LexToString ( const FNavigationElement Element)
friend

Member Data Documentation

◆ CustomGeometryExportDelegate

FCustomGeometryExport FNavigationElement::CustomGeometryExportDelegate

Delegate used during the geometry export based on the specified GeometryExportType

See also
GeometryExportType

◆ GeometrySliceExportDelegate

FGeometrySliceExport FNavigationElement::GeometrySliceExportDelegate

Delegate that can be used by very large elements to gather a limited piece of geometry for navigation generation in a given area.

◆ NavigationDataExportDelegate

FNavigationDataExport FNavigationElement::NavigationDataExportDelegate

Delegate used to gather navigation data like NavLinks, NavAreaModifiers, etc.


The documentation for this struct was generated from the following files: