Skip to content

Commit

Permalink
Fixed failure to delete duplicate instance
Browse files Browse the repository at this point in the history
  • Loading branch information
abrusle committed Apr 30, 2021
1 parent 71b0892 commit c20263b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Runtime/ScriptableSingleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected virtual void Awake()
if (_Instance != null && _Instance != this)
{
Debug.LogError($"An instance of {typeof(TObject)} already exist.");
DestroyImmediate(this);
DestroyImmediate(this, true);
}
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "net.abrusle.scriptable-singletons",
"displayName":"Scriptable Singletons",
"description":"Easy to use singleton implementation for ScriptableObjects in Unity.",
"version": "1.0.0",
"version": "1.0.1",
"unity":"2019.1",
"author": {
"name": "Abrusle",
Expand Down

0 comments on commit c20263b

Please sign in to comment.