Browse Source

ui资源释放

zhaoyang 3 years ago
parent
commit
ba21923541
1 changed files with 5 additions and 5 deletions
  1. 5 5
      GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

@@ -79,11 +79,11 @@ namespace GFGGame
         protected override void OnHide()
         {
 
-            // if (_sceneObject != null)
-            // {
-            //     GameObject.Destroy(_sceneObject);
-            //     _sceneObject = null;
-            // }
+            if (_sceneObject != null)
+            {
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
+            }
             base.OnHide();
         }
         protected override void RemoveEventListener()