From 2369e8723c3ea78761a5ea77bdf082bcd270ceb9 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Sat, 20 May 2023 11:25:44 +0800 Subject: [PATCH] Update TSingleton.cs --- Assets/GameScripts/HotFix/GameBase/Singleton/TSingleton.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/GameScripts/HotFix/GameBase/Singleton/TSingleton.cs b/Assets/GameScripts/HotFix/GameBase/Singleton/TSingleton.cs index 5b713e89..d6e2a5d1 100644 --- a/Assets/GameScripts/HotFix/GameBase/Singleton/TSingleton.cs +++ b/Assets/GameScripts/HotFix/GameBase/Singleton/TSingleton.cs @@ -42,7 +42,7 @@ namespace GameBase } }; } - UnityEngine.Object.DontDestroyOnLoad(_root); + Object.DontDestroyOnLoad(_root); } return _root; } @@ -70,7 +70,7 @@ namespace GameBase _gameObjects.Add(go.name, go); if (Application.isPlaying) { - UnityEngine.Object.DontDestroyOnLoad(go); + Object.DontDestroyOnLoad(go); } } } @@ -80,7 +80,7 @@ namespace GameBase if (_gameObjects != null && _gameObjects.ContainsKey(go.name)) { _gameObjects.Remove(go.name); - UnityEngine.Object.Destroy(go); + Object.Destroy(go); } }