You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But UnityAction, Action doesn't seem to be able to use something like OnInvokeAsync
Isn't UnityEvent, UnityAction, and Action all public delegate after all?
Why can't await Action.OnInvokeAsync?
The text was updated successfully, but these errors were encountered:
Only Action and UnityAction are delegates. UnityEvent is a special event type which is really just a regular class that adds delegates to internal lists. UnityEvents have AddListener and RemoveListener which makes it possible to await. Regular delegates have a special multi-cast implementation where when you += subscribe and -= unsubscribe, it actually overwrites the original value, so you can't (un)subscribe generically.
I couldn't find it in the document,
It seems that using OnInvokeAsync allows UnityEvent to wait.
for example
But UnityAction, Action doesn't seem to be able to use something like OnInvokeAsync
Isn't UnityEvent, UnityAction, and Action all public delegate after all?
Why can't await Action.OnInvokeAsync?
The text was updated successfully, but these errors were encountered: