UnityEssentials
Small but useful tools and features for Unity
Public Member Functions | Public Attributes | List of all members
UnityEngine.DoOnce Class Reference

Limits the execution of an event so it can only be executed one time. More...

Collaboration diagram for UnityEngine.DoOnce:
Collaboration graph

Public Member Functions

 DoOnce (UnityAction unityAction)
 
 DoOnce (UnityEvent calledEvent)
 
void Invoke ()
 Invokes all registered events callbacks (runtime and persistent). More...
 

Public Attributes

UnityEvent calledEvent
 The events called at the invoke. More...
 
bool eventInvoked = false
 Weather or not the even has been executed already. More...
 

Detailed Description

Limits the execution of an event so it can only be executed one time.

Definition at line 10 of file DoOnce.cs.

Constructor & Destructor Documentation

◆ DoOnce() [1/2]

UnityEngine.DoOnce.DoOnce ( UnityAction  unityAction)

Definition at line 22 of file DoOnce.cs.

◆ DoOnce() [2/2]

UnityEngine.DoOnce.DoOnce ( UnityEvent  calledEvent)

Definition at line 29 of file DoOnce.cs.

Member Function Documentation

◆ Invoke()

void UnityEngine.DoOnce.Invoke ( )

Invokes all registered events callbacks (runtime and persistent).

Definition at line 37 of file DoOnce.cs.

Member Data Documentation

◆ calledEvent

UnityEvent UnityEngine.DoOnce.calledEvent

The events called at the invoke.

Definition at line 16 of file DoOnce.cs.

◆ eventInvoked

bool UnityEngine.DoOnce.eventInvoked = false

Weather or not the even has been executed already.

Definition at line 20 of file DoOnce.cs.


The documentation for this class was generated from the following file: