Browse Source

load资源释放

zhaoyang 3 years ago
parent
commit
44d7f95602

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

@@ -40,10 +40,10 @@ namespace GFGGame
         {
         {
             _valueBarController.Dispose();
             _valueBarController.Dispose();
             _valueBarController = null;
             _valueBarController = null;
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             if (_comSelected != null)
             if (_comSelected != null)
             {
             {

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

@@ -57,10 +57,10 @@ namespace GFGGame
                 _valueBarController.Dispose();
                 _valueBarController.Dispose();
                 _valueBarController = null;
                 _valueBarController = null;
             }
             }
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             if (_imgSelected != null)
             if (_imgSelected != null)
             {
             {

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -18,10 +18,10 @@ namespace GFGGame
         private int guideId = 0;//0:没有引导 1:首次获得套装2:首次获得套装部件
         private int guideId = 0;//0:没有引导 1:首次获得套装2:首次获得套装部件
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             SceneController.DestroyObjectFromView(_gameObject1);
             SceneController.DestroyObjectFromView(_gameObject1);
 
 

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -32,10 +32,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             // UI_TypeItem.ClearProxy();
             // UI_TypeItem.ClearProxy();
             // UI_PartsListItem.ClearProxy();
             // UI_PartsListItem.ClearProxy();

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -33,10 +33,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             UI_TypeItem.ClearProxy();
             UI_TypeItem.ClearProxy();
             base.Dispose();
             base.Dispose();

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -578,10 +578,10 @@ namespace GFGGame
         }
         }
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             base.Dispose();
             base.Dispose();
         }
         }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/SuitShowView.cs

@@ -19,10 +19,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             if (_dressUpObjDataCache != null)
             if (_dressUpObjDataCache != null)
             {
             {

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -13,10 +13,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
 
 
             base.Dispose();
             base.Dispose();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

@@ -20,7 +20,7 @@ namespace GFGGame
             if (_sceneObject != null)
             if (_sceneObject != null)
             {
             {
                 GameObject.Destroy(_sceneObject);
                 GameObject.Destroy(_sceneObject);
-                _scenePrefab = null;
+                _sceneObject = null;
             }
             }
             base.Dispose();
             base.Dispose();
         }
         }

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

@@ -40,10 +40,10 @@ namespace GFGGame
         public override void Dispose()
         public override void Dispose()
         {
         {
             base.Dispose();
             base.Dispose();
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             _wordTextField = null;
             _wordTextField = null;
             _arrow = null;
             _arrow = null;

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -390,10 +390,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             SceneController.DestroyObjectFromView(_gameObject0);
             SceneController.DestroyObjectFromView(_gameObject0);
             SceneController.DestroyObjectFromView(_gameObject1);
             SceneController.DestroyObjectFromView(_gameObject1);

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleView.cs

@@ -11,10 +11,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             base.Dispose();
             base.Dispose();
         }
         }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -62,10 +62,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             SceneController.DestroyObjectFromView(_gameObject0);
             SceneController.DestroyObjectFromView(_gameObject0);
             SceneController.DestroyObjectFromView(_gameObject1);
             SceneController.DestroyObjectFromView(_gameObject1);

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetView.cs

@@ -11,10 +11,10 @@ namespace GFGGame
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             base.Dispose();
             base.Dispose();
         }
         }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -33,10 +33,10 @@ namespace GFGGame
             SceneController.DestroyObjectFromView(_gameObject);
             SceneController.DestroyObjectFromView(_gameObject);
             SceneController.DestroyObjectFromView(_gameObject1);
             SceneController.DestroyObjectFromView(_gameObject1);
 
 
-            if (_scenePrefab != null)
+            if (_sceneObject != null)
             {
             {
-                GameObject.Destroy(_scenePrefab);
-                _scenePrefab = null;
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
             }
             }
             if (_ui != null)
             if (_ui != null)
             {
             {

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -54,6 +54,11 @@ namespace GFGGame
                 SceneController.DestroyObjectFromView(_effects[i]);
                 SceneController.DestroyObjectFromView(_effects[i]);
                 SceneController.DestroyObjectFromView(_effects[i]);
                 SceneController.DestroyObjectFromView(_effects[i]);
             }
             }
+            if (_sceneObject != null)
+            {
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
+            }
             base.Dispose();
             base.Dispose();
         }
         }