protected void Awake() { agent = GetComponent <NavMeshAgent>(); health = GetComponent <Health>(); animator = GetComponentInChildren <Animator>(); behaviourTree = new BehaviourTree(); behaviourTree.btData = btGenerationData; behaviourTree.ConstructBehaviourTree(this); }