Skip to content

Commit

Permalink
Fix small problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Jan 7, 2025
1 parent 1fb51ad commit daef5ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions Unity/Assets/Actions/ActionWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down
2 changes: 1 addition & 1 deletion Unity/Assets/Actions/BaseNeuroAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 3 additions & 0 deletions Unity/Assets/Actions/INeuroAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public interface INeuroAction

WsAction GetWsAction();

/// <summary>
/// Sets the active action window for this action. This will be called by the SDK and should not be used manually!
/// </summary>
void SetActionWindow(ActionWindow actionWindow);
}
}

0 comments on commit daef5ff

Please sign in to comment.