We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21564ed commit 2c3f3f1Copy full SHA for 2c3f3f1
Runtime/Patterns/Singleton/MonoSingleton.cs
@@ -29,7 +29,7 @@ public static T Instance
29
{
30
get
31
32
- if (s_ApplicationIsQuitting)
+ if (s_ApplicationIsQuitting || s_IsDestroyed)
33
34
Debug.LogError(
35
$"{typeof(T)} [MonoSingleton] is already destroyed. " +
@@ -94,4 +94,4 @@ protected virtual void OnApplicationQuit()
94
s_ApplicationIsQuitting = true;
95
}
96
97
-}
+}
0 commit comments