private void OnSceneUnloaded(ModScene scene) { if (SceneUnloaded != null) { SceneUnloaded.Invoke(scene); } }
private void OnSceneUnloaded(Resource scene) { SceneUnloaded?.Invoke((ModScene)scene); if (!_scenes.Any(s => s.isBusy)) { End(); } }
/// <summary> /// Called when a new scene is unloaded. /// </summary> private void NotifySceneUnloaded(string[] sceneNames) { foreach (var sceneName in sceneNames) { Logger.LogInfo("Scene Unloaded: " + sceneName); } SceneUnloaded?.Invoke(this, new SceneEventArgs(sceneNames)); }
private void SceneUnloadedWrapper(Scene scene) { if (SceneUnloaded != null) { SceneUnloaded.Invoke(scene); } --NotFinishedRequests; _logger.InfoFormat("scene unloaded {0}", scene.name); }
static void ProcessSceneUnLoad(string sceneName) { s_LoadSceneOperations.Remove(sceneName); if (s_UnloadSceneCallbacks.TryGetValue(sceneName, out var callbacks)) { s_UnloadSceneCallbacks.Remove(sceneName); foreach (var callback in callbacks) { callback(); } } SceneUnloaded.Invoke(new SceneInfo(sceneName)); }
static void SceneUnloadComplete(Scene scene) { SceneUnloaded.Invoke(scene); if (s_UnloadSceneCallbacks.TryGetValue(scene.name, out var callbacks)) { foreach (var callback in callbacks) { callback(); } s_UnloadSceneCallbacks.Remove(scene.name); } s_LoadSceneOperations.Remove(scene.name); }
static void AddressableSceneUnloaded(AddressableSceneUnloaderResult result) { AddressablesLogger.Log($"[ADDRESSABLES] AddressableSceneUnloaded Status: {result.AsyncOperationHandle.Status}, Scene: {result.SceneName}"); SceneUnloaded.Invoke(result.Scene); if (s_UnloadSceneCallbacks.TryGetValue(result.SceneName, out var callbacks)) { foreach (var callback in callbacks) { callback(); } s_UnloadSceneCallbacks.Remove(result.SceneName); } s_LoadSceneOperations.Remove(result.SceneName); }
internal static void Internal_OnSceneEvent(SceneEventType eventType, Scene scene, ref Guid sceneId) { switch (eventType) { case SceneEventType.Saving: SceneSaving?.Invoke(scene, sceneId); break; case SceneEventType.Saved: SceneSaved?.Invoke(scene, sceneId); break; case SceneEventType.SaveError: SceneSaveError?.Invoke(scene, sceneId); break; case SceneEventType.Loading: SceneLoading?.Invoke(scene, sceneId); break; case SceneEventType.Loaded: SceneLoaded?.Invoke(scene, sceneId); break; case SceneEventType.LoadError: SceneLoadError?.Invoke(scene, sceneId); break; case SceneEventType.Unloading: SceneUnloading?.Invoke(scene, sceneId); break; case SceneEventType.Unloaded: SceneUnloaded?.Invoke(scene, sceneId); break; } }
private static void HandleSceneUnloaded(Scene scene) => SceneUnloaded?.Invoke(scene);
private static void OnSceneUnloaded(Scene scene) { SceneManager.sceneUnloaded -= OnSceneUnloaded; SceneUnloaded?.Invoke(scene); }