Skip to content

Commit c20263b

Browse files
committed
Fixed failure to delete duplicate instance
1 parent 71b0892 commit c20263b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Runtime/ScriptableSingleton.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected virtual void Awake()
4747
if (_Instance != null && _Instance != this)
4848
{
4949
Debug.LogError($"An instance of {typeof(TObject)} already exist.");
50-
DestroyImmediate(this);
50+
DestroyImmediate(this, true);
5151
}
5252
}
5353
#endif

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "net.abrusle.scriptable-singletons",
33
"displayName":"Scriptable Singletons",
44
"description":"Easy to use singleton implementation for ScriptableObjects in Unity.",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"unity":"2019.1",
77
"author": {
88
"name": "Abrusle",

0 commit comments

Comments
 (0)