private static void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e) { if (e.Operation == SceneOperationKind.Clear) { TranslationHelper.NotifyBehaviorChanged(e); } }
private void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e) { #if DEBUG //Logger.LogDebug( $"StudioSaveLoadApi_SceneLoad({sender}, {e}) {CurrentScenePathCandidate}, {e.Operation}"); #endif if (e.Operation == SceneOperationKind.Clear) { _currentScenePath = _currentScenePathCandidate = string.Empty; } var coroutines = new List <IEnumerator>(); if (!string.IsNullOrEmpty(_currentScenePathCandidate) && e.Operation == SceneOperationKind.Load) { _currentScenePath = _currentScenePathCandidate; _currentScenePathCandidate = string.Empty; if (_navigationInProgress) { coroutines.Add( CoroutineUtils.CreateCoroutine(() => PlayNotificationSound(NotificationSound.Success))); coroutines.Add(SetPageCoroutine(_currentScenePath)); } } coroutines.Add(CoroutineUtils.CreateCoroutine(() => { _navigationInProgress = false; TrackLastLoadedScene(); })); coroutines.Add(SaveTrackingFileCouroutine(_saveTrackingFileDelay)); StartCoroutine(CoroutineUtils.ComposeCoroutine(coroutines.ToArray())); }
private void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e) { if (e.Operation != SceneOperationKind.Clear) { return; } Reset(); }
private void OnSceneLoad(object sender, SceneLoadEventArgs e) { if (e.Operation == SceneOperationKind.Import && ImportSound.Value) { PlayAlertSound(); } else if (e.Operation == SceneOperationKind.Load && LoadSound.Value) { PlayAlertSound(); } }
private void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e) { UpdateSaveReady(); if (e.Operation == SceneOperationKind.Clear) { _currentScenePath = _currentScenePathCandidate = string.Empty; } var coroutines = GeBoCommon.Utilities.ListPool <IEnumerator> .Get(); try { if (!string.IsNullOrEmpty(_currentScenePathCandidate) && e.Operation == SceneOperationKind.Load) { _currentScenePath = _currentScenePathCandidate; _currentScenePathCandidate = string.Empty; if (_navigationInProgress) { coroutines.Add( CoroutineUtils.CreateCoroutine(() => PlayNotificationSound(NotificationSound.Success))); coroutines.Add(SetPageCoroutine(_currentScenePath)); } } coroutines.Add(CoroutineUtils.CreateCoroutine(() => { _navigationInProgress = false; TrackLastLoadedScene(); })); coroutines.Add(SaveTrackingFileCouroutine()); StartCoroutine(CoroutineUtils.ComposeCoroutine(coroutines.ToArray())); } finally { GeBoCommon.Utilities.ListPool <IEnumerator> .Release(coroutines); } }