private void OnDestroy() { if (this == Instance) { Instance = null; } }
private void CreateInstance() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }