Skip to content

Commit

Permalink
Switch from using Destroy to DestroyImmediate in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Bylund authored and Mikkel Sørensen committed Nov 20, 2023
1 parent b7af921 commit f98bb76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Runtime/Client/LootLockerServerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public static void Instantiate()
public static void Reset()
{
if (_instance == null) return;
#if UNITY_EDITOR
DestroyImmediate(_instance.gameObject);
#else
Destroy(_instance.gameObject);
#endif
_instance = null;
}

Expand Down

0 comments on commit f98bb76

Please sign in to comment.