Browse Source

UI界面上的换装对象优化

guodong 2 years ago
parent
commit
2b80e6b888

+ 2 - 6
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjUI.cs

@@ -34,12 +34,8 @@ namespace GFGGame
 
         public void Dispose()
         {
-
-            if (_scenePrefab != null)
-            {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
-            }
+            //预制体不能被销毁
+            _scenePrefab = null;
 
             if (sceneObject != null)
             {

+ 0 - 5
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -41,11 +41,6 @@ namespace GFGGame
                 _valueBarController = null;
             }
 
-            if (_dressUpObjUI != null)
-            {
-                _dressUpObjUI.Dispose();
-                _dressUpObjUI = null;
-            }
             if (_comSelected != null)
             {
                 _comSelected.RemoveFromParent();