diff --git a/Unity/Assets/Actions/ActionWindow.cs b/Unity/Assets/Actions/ActionWindow.cs index b30fef4..c67ad70 100644 --- a/Unity/Assets/Actions/ActionWindow.cs +++ b/Unity/Assets/Actions/ActionWindow.cs @@ -132,11 +132,7 @@ public ActionWindow AddAction(INeuroAction action) if (action.ActionWindow != null) { - if (action.ActionWindow == this) - { - Debug.LogError($"Action {action.Name} has already been added to this ActionWindow."); - } - else + if (action.ActionWindow != this) { Debug.LogError($"Cannot add action {action.Name} to this ActionWindow because it is already included in another ActionWindow."); } diff --git a/Unity/Assets/Actions/BaseNeuroAction.cs b/Unity/Assets/Actions/BaseNeuroAction.cs index 2e835a9..c4b4437 100644 --- a/Unity/Assets/Actions/BaseNeuroAction.cs +++ b/Unity/Assets/Actions/BaseNeuroAction.cs @@ -56,7 +56,7 @@ public virtual WsAction GetWsAction() protected abstract ExecutionResult Validate(ActionJData actionData, out object? parsedData); protected abstract UniTask ExecuteAsync(object? data); - public void SetActionWindow(ActionWindow actionWindow) + void INeuroAction.SetActionWindow(ActionWindow actionWindow) { if (ActionWindow != null) { diff --git a/Unity/Assets/Actions/INeuroAction.cs b/Unity/Assets/Actions/INeuroAction.cs index f3ab66d..216959b 100644 --- a/Unity/Assets/Actions/INeuroAction.cs +++ b/Unity/Assets/Actions/INeuroAction.cs @@ -23,6 +23,9 @@ public interface INeuroAction WsAction GetWsAction(); + /// + /// Sets the active action window for this action. This will be called by the SDK and should not be used manually! + /// void SetActionWindow(ActionWindow actionWindow); } }