Method FindBehaviorTreeByPath
FindBehaviorTreeByPath(string)
Finds a behavior tree by its path. Returns null if not found.
Declaration
IBehaviorTreeAccessor FindBehaviorTreeByPath(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path of the behavior tree, either absolute or relative. |
Returns
Type | Description |
---|---|
IBehaviorTreeAccessor | The behavior tree at the specified path, or null if not found. |
Examples
var behaviorTree = AuraTree.FindBehaviorTreeByPath("MyProject/BehaviorTrees/Tree1");
if (behaviorTree != null)
{
Log.Info("Behavior tree found!");
}
else
{
Log.Info("Behavior tree not found.");
}