void OnDestroy() { if (Instance == this) { Instance = null; } }
// Use this for initialization void Start() { if (Instance == null) { Instance = this; } else { gameObject.SetActive(false); } }