private void Reset() { var childBehaviorTree = GetComponentInChildren <BTNode>(); var source = new BehaviorTreeSourceGameObject { Root = childBehaviorTree , AutoDestroy = childBehaviorTree != null }; _source = source; }