public static void DestroyInstance() { if (!UnityUtility.IsNull(instance)) { UnityUtility.SafeDelete(instance.gameObject); } }
private void CheckInstance() { if (instance != this) { if (Application.isPlaying) { UnityUtility.SafeDelete(gameObject); } } }