소스 검색

添加材质球释放代码

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;