Hi, I'm trying to control a behaviour tree (as directed in other question) so I can update manually within a coroutine (within Team Member). I have a behaviour tree on my gameobject which references an external beahviour. I have start when enabled set to false, and I'm trying to trigger it with this code:
The issue I'm having is that BehaviorManager.instance is Null. Is there additional code I need to add to initialise BehaviourManager?
Thanks!
Ant
Code:
IEnumerator StartBehaviourTree()
{
if (BehaviorManager.instance == null) Debug.LogError("Behaviour tree instance is null");
BehaviorManager.instance.Tick(m_behaviourTree);
while (m_behaviourTree.ExecutionStatus == BehaviorDesigner.Runtime.Tasks.TaskStatus.Running)
{
yield return null;
}
}
The issue I'm having is that BehaviorManager.instance is Null. Is there additional code I need to add to initialise BehaviourManager?
Thanks!
Ant