protected override void LocalUpdate(AgentContext context) { bool failed; TaskUtil.Process(context, rootTask, out failed); state = (failed ? TaskState.Failed : TaskState.Active); }
void FixedUpdate() { bool failed; TaskUtil.Process(context, mBrain, out failed); if (failed) { Debug.LogError(name + ": Agent brain failed. Will attempt a re-start."); } else { PostFixedUpdate(); } }