15 [Tooltip(
"The events called at the invoke")]
22 public DoOnce(UnityAction unityAction)
24 UnityEvent unityEvent =
new UnityEvent();
25 unityEvent.AddListener(unityAction);
26 this.calledEvent = unityEvent;
Limits the execution of an event so it can only be executed one time.
void Invoke()
Invokes all registered events callbacks (runtime and persistent).
bool eventInvoked
Weather or not the even has been executed already.
UnityEvent calledEvent
The events called at the invoke.
DoOnce(UnityEvent calledEvent)
DoOnce(UnityAction unityAction)