public static void RemoveLoadGameSceneListener(OnLoadGameScene callback) { if (_instance == null) return; // could be called during game exit _instance.sceneLoadListeners -= callback; }
/// <summary> /// register a listener to notify when LoadGameScene() is called (true is passed to callback) /// and also when the scene is done loading (false is passed to callback/listener) /// </summary> public static void RegisterLoadGameSceneListener(OnLoadGameScene callback) { _instance.sceneLoadListeners += callback; }