ソースを参照

ASingleton Dispose后要把Instance设置为null

tanghai 2 年 前
コミット
295815511c
1 ファイル変更3 行追加1 行削除
  1. 3 1
      Unity/Assets/Scripts/Core/World/Singleton.cs

+ 3 - 1
Unity/Assets/Scripts/Core/World/Singleton.cs

@@ -47,8 +47,10 @@
             }
             
             this.isDisposed = true;
-            
+
             this.Destroy();
+            
+            Instance = null;
         }
     }
 }