/// <summary> /// This must be called from "Awake" /// Remember to add the "OnDestroy" pair > RemoveFromCall /// </summary> public static void CallWhenLoaded(LoadYourself callback) { loadCompleteEvent += callback; }
/// <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; }
/// <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; }