// Can already be interrupted due to BeforeStart OutputChanges failing public void StartBehavior(ActionType actionType, Entity target, List <Selector> attributeSelectors, bool wasInterrupted) { behaviorType = actionType.behaviorType; behaviorContext.Set(actionType, target, attributeSelectors); isRunning = true; this.wasInterrupted = wasInterrupted; lastOCUpdateTime = Time.time; behaviorType.SetContext(agent, behaviorContext); agent.historyType.RecordBehaviorLog(agent, HistoryType.BehaviorRunType.Started, behaviorType); behaviorType.StartBehavior(agent); agent.StartCoroutine(UpdateBehavior()); }