Class NavMesh
The navigation mesh actor that holds a navigation data for a scene.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Navigation/NavMesh.h
Syntax
public class NavMesh : public Actor
Fields
Data
DataAsset
The cached navmesh data asset.
Declaration
public AssetReference<RawDataAsset> DataAsset
Field Value
AssetReference<RawDataAsset>
|
IsDataDirty
The flag used to mark that navigation data has been modified since load. Used to save runtime data to the file on scene serialization.
Declaration
public bool IsDataDirty
Field Value
bool
|
Properties
The navigation mesh properties.
Declaration
public NavMeshProperties Properties
Field Value
NavMeshProperties
|
ShowDebugDraw
If checked, the navmesh will be drawn in debug view when showing navigation data.
Declaration
public bool ShowDebugDraw = true
Field Value
bool
|
Methods
ClearData()
Clears the data.
Declaration
public void ClearData()
Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
Deserializes object from the input stream.
Declaration
public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
Parameters
DeserializeStream
stream
The input stream. |
ISerializeModifier
modifier
The deserialization modifier object. Always valid. |
Overrides
GetRuntime(bool createIfMissing=true)
Gets the navmesh runtime object that matches with properties.
Declaration
public NavMeshRuntime* GetRuntime(bool createIfMissing=true) const
Parameters
bool
createIfMissing
|
Returns
NavMeshRuntime
|
Initialize()
Called after object loading or spawning to initialize the object (eg. call OnAwake for scripts) but before BeginPlay. Initialization should be performed only within a single SceneObject (use BeginPlay to initialize with a scene).
Declaration
protected virtual void Initialize() override
Overrides
OnDisable()
Called when actor gets removed from game systems. Occurs on EndPlay event or when actor gets inactivated in hierarchy. Use this event to unregister object from other game system (eg. audio).
Declaration
protected virtual void OnDisable() override
Overrides
OnEnable()
Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).
Declaration
protected virtual void OnEnable() override
Overrides
SaveNavMesh()
Saves the nav mesh tiles data to the asset. Supported only in builds with assets saving enabled (eg. editor) and not during gameplay (eg. design time).
Declaration
public void SaveNavMesh()
Serialize(SerializeStream& stream, const void* otherObj)
Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.
Declaration
public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
Parameters
SerializeStream
stream
The output stream. |
void
otherObj
The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties. |