Prechádzať zdrojové kódy

ASingleton Dispose后要把Instance设置为null

tanghai 2 rokov pred
rodič
commit
295815511c

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

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