diff --git a/Assets/Scripts/FixSystemNew/FixSceneDirector.cs b/Assets/Scripts/FixSystemNew/FixSceneDirector.cs index 2b052e274..91ed28650 100644 --- a/Assets/Scripts/FixSystemNew/FixSceneDirector.cs +++ b/Assets/Scripts/FixSystemNew/FixSceneDirector.cs @@ -47,6 +47,19 @@ namespace AibisDream.FixSystem IsTransitioning = false; } + /// + /// Clears director state without running cue exits. Used while the owning scene is + /// being destroyed, when cue dependencies may already have been torn down. + /// + public void Reset() + { + CurrentArgs = ""; + _currentCue = null; + CurrentMode = FixSceneMode.Default; + HasMode = false; + IsTransitioning = false; + } + private IEnumerator TransitionInternal(FixSceneMode nextMode, string args, FixTransitionMode mode) { if (IsTransitioning && mode == FixTransitionMode.Animated) diff --git a/Assets/Scripts/FixSystemNew/FixSystemCenter.cs b/Assets/Scripts/FixSystemNew/FixSystemCenter.cs index 484005444..0f545579c 100644 --- a/Assets/Scripts/FixSystemNew/FixSystemCenter.cs +++ b/Assets/Scripts/FixSystemNew/FixSystemCenter.cs @@ -50,9 +50,9 @@ namespace AibisDream.FixSystem public override void OnSingletonDestroy() { IsDirectorReady = false; - CameraKit.Instance.RemoveAllCam(); - BubbleSlotKit.Instance.RemoveAll(); - GameManager.Instance.StartCoroutine(Director.QuitCurrentMode()); + CameraKit.Instance?.RemoveAllCam(); + BubbleSlotKit.Instance?.RemoveAll(); + Director?.Reset(); Context?.Clear(); }