From 2f5c25366e84849cc8f3df370ad17a3045764589 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Tue, 12 Feb 2019 00:24:51 +0000 Subject: [PATCH] Singleton.cs edited online with Bitbucket changed Destroy(this gameobject) to Destroy(this) --- Assets/Scipts/Utility/Singleton.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scipts/Utility/Singleton.cs b/Assets/Scipts/Utility/Singleton.cs index 00af291..e0956b7 100644 --- a/Assets/Scipts/Utility/Singleton.cs +++ b/Assets/Scipts/Utility/Singleton.cs @@ -20,7 +20,7 @@ public class MonoSingleton : MonoBehaviour where T : MonoSingleton private void SetAsSingleton() { if (Instance != null && Instance != this) - Destroy(this.gameObject); + Destroy(this); else Instance = (T)this;