Skip to content

Commit f98bb76

Browse files
Erik BylundMikkel Sørensen
authored andcommitted
Switch from using Destroy to DestroyImmediate in editor
1 parent b7af921 commit f98bb76

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Runtime/Client/LootLockerServerApi.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public static void Instantiate()
3535
public static void Reset()
3636
{
3737
if (_instance == null) return;
38+
#if UNITY_EDITOR
39+
DestroyImmediate(_instance.gameObject);
40+
#else
3841
Destroy(_instance.gameObject);
42+
#endif
3943
_instance = null;
4044
}
4145

0 commit comments

Comments
 (0)