فهرست منبع

添加材质球释放代码

leiyasi 1 سال پیش
والد
کامیت
bcbad2fbad
1فایلهای تغییر یافته به همراه1 افزوده شده و 7 حذف شده
  1. 1 7
      GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

+ 1 - 7
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -493,16 +493,10 @@ namespace GFGGame
         {
             var handle = YooAssets.LoadAssetSync<Material>(ResPathUtil.GetPrefabPath("ImageGradient", "mat"));
             Material m = handle.AssetObject as Material;
-
             Material copyM = new Material(m.shader);
+            handle.Release();
             copyM.CopyPropertiesFromMaterial(m);
 
-            AssetReleaser assetReleaser = _ui.m_loaBg2.displayObject.gameObject.GetComponent<AssetReleaser>();
-            if (assetReleaser != null)
-            {
-                //必须立即销毁,不能改为Destroy代替
-                GameObject.DestroyImmediate(assetReleaser);
-            }
             _ui.m_loaBg2.material = copyM;
             _ui.m_loaBg2.position = _ui.m_loaBg.position;
             float startY = _ui.m_loaBg2Pos.position.y;