Browse Source

换装调试

guodong 3 years ago
parent
commit
44eff6b72d
1 changed files with 16 additions and 15 deletions
  1. 16 15
      GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

+ 16 - 15
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -265,21 +265,22 @@ namespace GFGGame
                 GameObject gameObj_t = transform_t.gameObject;
                 if (gameObj_t != null)
                 {
-                    SpriteRenderer spr = null;
-                    spr = gameObj_t.GetComponent<SpriteRenderer>();
-                    if(spr != null)
-                    {
-                        spr.sprite = null;
-                    }
-                    var assetDisposer = gameObj_t.GetComponent<AssetReleaser>();
-                    if(assetDisposer != null)
-                    {
-                        if (!string.IsNullOrEmpty(assetDisposer.resPath))
-                        {
-                            GFGAsset.Release(assetDisposer.resPath);
-                            assetDisposer.resPath = null;
-                        }
-                    }
+                    GameObject.DestroyImmediate(gameObj_t);
+                    //SpriteRenderer spr = null;
+                    //spr = gameObj_t.GetComponent<SpriteRenderer>();
+                    //if(spr != null)
+                    //{
+                    //    spr.sprite = null;
+                    //}
+                    //var assetDisposer = gameObj_t.GetComponent<AssetReleaser>();
+                    //if(assetDisposer != null)
+                    //{
+                    //    if (!string.IsNullOrEmpty(assetDisposer.resPath))
+                    //    {
+                    //        GFGAsset.Release(assetDisposer.resPath);
+                    //        assetDisposer.resPath = null;
+                    //    }
+                    //}
                 }
             }
         }