From b83e4c3a5e95306e21e4a6a9079b703ad5bb89c2 Mon Sep 17 00:00:00 2001 From: NTG_Lenovo Date: Thu, 10 Jul 2025 19:32:01 +0900 Subject: [PATCH] =?UTF-8?q?DDD-32=20GameFlowManager=EC=9D=98=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=9D=BC=EB=B6=80SceneManager=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EA=B4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs | 9 +-------- Assets/_DDD/_Scripts/GameFramework/SceneManager.cs | 7 ++++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs index ce01d32f7..ebc24fd2f 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; +using UnityEngine.ResourceManagement.ResourceProviders; using UnityEngine.SceneManagement; namespace DDD @@ -27,8 +28,6 @@ public void Init() public async void PostInit() { - SceneManager.Instance.OnSceneChanged += OnFlowSceneOpened; - try { if (IsGameStarted() == false) @@ -109,12 +108,6 @@ public void OpenFlowScene(GameFlowState newFlowState) } } - private Scene _currentScene; - public void OnFlowSceneOpened(Scene newScene) - { - _currentScene = newScene; - } - public bool GetFlowScene(GameFlowState flowState, out SceneType sceneType) { return GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out sceneType); diff --git a/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs b/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs index 7dfa1c17d..3bb19f9ad 100644 --- a/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs +++ b/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using UnityEngine; using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.SceneManagement; namespace DDD { @@ -18,7 +17,9 @@ public class SceneManager : Singleton, IManager { private Dictionary _loadedScenes; - public Action OnSceneChanged; + private SceneInstance _currentSceneInstance; + + public Action OnSceneChanged; public void Init() { @@ -87,7 +88,7 @@ public void ActivateScene(SceneType sceneType) } UnityEngine.SceneManagement.SceneManager.SetActiveScene(sceneInstance.Scene); - OnSceneChanged?.Invoke(sceneInstance.Scene); + _currentSceneInstance = sceneInstance; } else {