Browse Source

回收预制体前清空targetTexture

leiyasi 1 year ago
parent
commit
3e44069981

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -1026,12 +1026,16 @@ namespace GFGGame
 
         private void DestroyHeadImg()
         {
+            _dressUpSceneObj.transform.Find("Camera").GetComponent<Camera>().targetTexture = null;
+
+            // 回收RawImage
             if (_selfHeadImgObj != null)
             {
                 PrefabManager.Instance.Restore(_selfHeadImgObj);
                 _selfHeadImgObj = null;
             }
 
+            // 回收相机预制
             if (_dressUpSceneObj != null)
             {
                 PrefabManager.Instance.Restore(_dressUpSceneObj);