Method GetBehaviorTreeByPath
GetBehaviorTreeByPath(string)
Gets a behavior tree by its path. Throws an exception if not found.
Declaration
IBehaviorTreeAccessor GetBehaviorTreeByPath(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. |
Examples
try
{
var behaviorTree = AuraTree.GetBehaviorTreeByPath("MyProject/BehaviorTrees/Tree1");
Log.Info("Behavior tree found!");
}
catch (NotFoundException)
{
Log.Info("Behavior tree not found.");
}