protected override NodeState OnRunning(ExecutionContext context) { var sc = (SimpleContext)_context; target = sc.Actor.GetComponent <agentStateController>().searchTarget; Debug.Log("Search for " + target.ToString()); //здесь 3 _tree.Execute(context); //SimpleContext sc = (SimpleContext)context; return(NodeState.Success); }
// Update is called once per frame void Update() { _tree.Execute(_context); }