Example #1
0
 /// <summary>
 /// This must be called from "Awake"
 /// Remember to add the "OnDestroy" pair > RemoveFromCall
 /// </summary>
 public static void CallWhenLoaded(LoadYourself callback)
 {
     loadCompleteEvent += callback;
 }
Example #2
0
 /// <summary>
 /// This should always be called "OnDestroy" to make things work if you ever delete an object and/or reload a scene
 /// </summary>
 /// <param name="callback"></param>
 public static void RemoveFromCall(LoadYourself callback)
 {
     loadCompleteEventEarly -= callback;
     loadCompleteEvent      -= callback;
 }
Example #3
0
 /// <summary>
 /// This must be called from "Awake"
 /// Remember to add the "OnDestroy" pair > RemoveFromCall
 /// </summary>
 public static void CallWhenLoaded(LoadYourself callback, int order)
 {
     loadCompleteEventEarly += callback;
 }