Class BehaviorTree
Behavior Tree asset with AI logic graph.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/AI/BehaviorTree.h
Syntax
public class BehaviorTree : public BinaryAsset
Fields
Graph
Methods
getChunksToPreload()
Gets packed chunks indices to preload before asset loading action
Declaration
protected virtual AssetChunksFlag getChunksToPreload() const override
Returns
AssetChunksFlag
Chunks to load flags |
Overrides
GetNodeInstance(uint32 id)
Gets a specific node instance object from Behavior Tree.
Declaration
public BehaviorTreeNode* GetNodeInstance(uint32 id)
Parameters
uint32
id
The unique node identifier (Visject surface). |
Returns
BehaviorTreeNode
The node instance or null if cannot get it. |
GetReferences(Array<Guid>& assets, Array<String>& files)
Declaration
public void GetReferences(Array<Guid>& assets, Array<String>& files) const override
Parameters
Array<Guid>
assets
|
Array<String>
files
|
load()
Load data from the chunks
Declaration
protected virtual LoadResult load() override
Returns
LoadResult
Loading result |
Overrides
LoadSurface()
Tries to load surface graph from the asset.
Declaration
public BytesContainer LoadSurface() const
Returns
BytesContainer
The surface data or empty if failed to load it. |
OnScriptingDispose()
Declaration
public virtual void OnScriptingDispose() override
Overrides
Save(const StringView& path=StringView::Empty)
Saves this asset to the file. Supported only in Editor.
Declaration
public virtual bool Save(const StringView& path=StringView::Empty) override
Parameters
StringView
path
The custom asset path to use for the saving. Use empty value to save this asset to its own storage location. Can be used to duplicate asset. Must be specified when saving virtual asset. |
Returns
bool
True when cannot save data, otherwise false. |
Overrides
SaveSurface(const BytesContainer& data)
Updates the graph surface (save new one, discard cached data, reload asset).
Declaration
public bool SaveSurface(const BytesContainer& data) const
Parameters
BytesContainer
data
Stream with graph data. |
Returns
bool
True if cannot save it, otherwise false. |
unload(bool isReloading)
Unloads asset data
Declaration
protected virtual void unload(bool isReloading) override
Parameters
bool
isReloading
True if asset is reloading data, otherwise false. |