public void AddAction(ActionTask action) { if (action is ActionList) { foreach (var subAction in (action as ActionList).actions) { AddAction(subAction); } return; } #if UNITY_EDITOR UndoUtility.RecordObject(ownerSystem.contextObject, "List Add Task"); currentViewAction = action; #endif actions.Add(action); action.SetOwnerSystem(this.ownerSystem); }
public void AddAction(ActionTask action) { if (action is ActionList) { Debug.LogWarning("Adding an ActionList within another ActionList is not allowed for clarity"); return; } #if UNITY_EDITOR if (!Application.isPlaying) { Undo.RecordObject(ownerSystem.contextObject, "List Add Task"); currentViewAction = action; } #endif actions.Add(action); action.SetOwnerSystem(this.ownerSystem); }
public void AddAction(ActionTask action) { if (action is ActionList) { foreach (var subAction in (action as ActionList).actions) { AddAction(subAction); } return; } #if UNITY_EDITOR if (!Application.isPlaying) { Undo.RecordObject(ownerSystem.contextObject, "List Add Task"); currentViewAction = action; } #endif actions.Add(action); action.SetOwnerSystem(this.ownerSystem); // action.isActive = true; }