public NodeActionEditorWrapper(ActionKitAction action) { mAction = action; UnityEditor.EditorApplication.update += Update; mAction.OnEndedCallback += () => { UnityEditor.EditorApplication.update -= Update; }; }
void Update() { if (!mAction.Finished && mAction.Execute(Time.deltaTime)) { mAction.Dispose(); mAction = null; } }
public NodeActionEditorWrapper(ActionKitAction action) { mAction = action; #if UNITY_EDITOR UnityEditor.EditorApplication.update += Update; mAction.OnEndedCallback += () => { UnityEditor.EditorApplication.update -= Update; }; #endif }