Navigation
API > API/Runtime > API/Runtime/Engine
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:
Single UObject representing the navigation element constructed from a UObject raw or weak pointer
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
| Name | FNavigationElement |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/AI/Navigation/NavigationElement.h |
| Include Path | #include "AI/Navigation/NavigationElement.h" |
Syntax
struct FNavigationElement : public TSharedFromThis< FNavigationElement >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FNavigationElement
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNavigationElement
(
const UObject* Object, |
AI/Navigation/NavigationElement.h | ||
FNavigationElement
(
const INavRelevantInterface& NavRelevant, |
AI/Navigation/NavigationElement.h | ||
FNavigationElement
(
const UObject& Object, |
AI/Navigation/NavigationElement.h | ||
| AI/Navigation/NavigationElement.h | |||
FNavigationElement
(
FPrivateToken, |
Public, but can only be called by FNavigationElement and friends, because it needs access to FPrivateToken. | AI/Navigation/NavigationElement.h | |
FNavigationElement
(
const UObject& Object, |
AI/Navigation/NavigationElement.h |
Structs
| Name | Remarks |
|---|---|
| FPrivateToken |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CustomGeometryExportDelegate | FCustomGeometryExport | Delegate used during the geometry export based on the specified GeometryExportType | AI/Navigation/NavigationElement.h | |
| GeometrySliceExportDelegate | FGeometrySliceExport | Delegate that can be used by very large elements to gather a limited piece of geometry for navigation generation in a given area. | AI/Navigation/NavigationElement.h | |
| NavigationDataExportDelegate | FNavigationDataExport | Delegate used to gather navigation data like NavLinks, NavAreaModifiers, etc. | AI/Navigation/NavigationElement.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDirtyAreaOnRegistration | bool | Indicates if the area covered by the navigation bounds should be dirtied when inserting, or removing, the element in the navigation octree (default behavior). | AI/Navigation/NavigationElement.h | |
| bIsFromLevelVisibilityChange | bool | Indicates that the element was created from a UObject while its level was pending being made invisible or visible (i.e., loading/unloading). | AI/Navigation/NavigationElement.h | |
| bIsInBaseNavigationData | bool | Indicates that 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. | AI/Navigation/NavigationElement.h | |
| BodySetup | TWeakObjectPtr< UBodySetup > | Associated body setup (if any) used by the default geometry export. | AI/Navigation/NavigationElement.h | |
| Bounds | FBox | Bounds used to register the element in the navigation octree. | AI/Navigation/NavigationElement.h | |
| GeometryExportType | EHasCustomNavigableGeometry::Type | Indicates the type of geometry export to use for the current element. | AI/Navigation/NavigationElement.h | |
| GeometryGatheringMode | ENavDataGatheringMode | Indicates when the geometry gathering must be executed: | AI/Navigation/NavigationElement.h | |
| GeometryTransform | FTransform | Transform used by the default geometry export. | AI/Navigation/NavigationElement.h | |
| NavigationParent | TWeakObjectPtr< const UObject > | Indicates that this element is not registered as a new node in the navigation octree, but instead adds its navigation data to the parent octree node. | AI/Navigation/NavigationElement.h | |
| OwnerUObject | TWeakObjectPtr< const UObject > | The associated UObject provided to create the element. | AI/Navigation/NavigationElement.h | |
| SubElementId | uint64 | Optional ID that can be used when a UObject owns and manages multiple sub-elements which should be represented individually in the navigation system (i.e., each sub-element has its own bounds and should be registered in an octree node). | AI/Navigation/NavigationElement.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBodySetup * GetBodySetup() |
AI/Navigation/NavigationElement.h | ||
FBox GetBounds() |
AI/Navigation/NavigationElement.h | ||
bool GetDirtyAreaOnRegistration () |
AI/Navigation/NavigationElement.h | ||
FString GetFullName() |
AI/Navigation/NavigationElement.h | ||
| AI/Navigation/NavigationElement.h | |||
| AI/Navigation/NavigationElement.h | |||
FNavigationElementHandle GetHandle() |
Returns a handle that can be used to uniquely identify this element. | AI/Navigation/NavigationElement.h | |
FString GetName() |
AI/Navigation/NavigationElement.h | ||
const TWeakObjectPtr< const UObject > & GetNavigationParent() |
AI/Navigation/NavigationElement.h | ||
FString GetPathName() |
AI/Navigation/NavigationElement.h | ||
const FTransform & GetTransform() |
AI/Navigation/NavigationElement.h | ||
TWeakObjectPtr< const UObject > GetWeakUObject () |
Inlines (FNavigationElement) | AI/Navigation/NavigationElement.h | |
bool IsFromLevelVisibilityChange() |
AI/Navigation/NavigationElement.h | ||
bool IsInBaseNavigationData() |
AI/Navigation/NavigationElement.h | ||
void SetBodySetup
(
UBodySetup* InBodySetup |
Sets the body setup to use for the default geometry export. | AI/Navigation/NavigationElement.h | |
void SetBounds
(
const FBox& InBounds |
Sets the Bounds to use when registering the element in the navigation octree. | AI/Navigation/NavigationElement.h | |
void SetDirtyAreaOnRegistration
(
const bool bInDirtyAreaOnRegistration |
Sets whether the area covered by the navigation bounds should be dirtied when inserting, or removing, the element in the navigation octree (default behavior). | AI/Navigation/NavigationElement.h | |
void SetGeometryExportType
(
const EHasCustomNavigableGeometry::Type InCustomNavigableGeometry |
Sets the type of geometry export to use for the current element | AI/Navigation/NavigationElement.h | |
void SetGeometryGatheringMode
(
const ENavDataGatheringMode InGeometryGatheringMode |
Sets the mode that indicates when the geometry gathering must be executed. | AI/Navigation/NavigationElement.h | |
void SetNavigationParent
(
const UObject* InNavigationParent |
Sets the UObject for which the associated octree node will be used to hold the current element navigation data. | AI/Navigation/NavigationElement.h | |
void SetTransform
(
const FTransform& InGeometryTransform |
Sets the Transform to use for the default geometry export. | AI/Navigation/NavigationElement.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedRef< const FNavigationElement > CreateFromNavRelevantInterface
(
const INavRelevantInterface& NavRelevantInterface |
Factory helper function to create and initialize a sharable element from INavRelevantInterface. | AI/Navigation/NavigationElement.h |