private void OnDestroy() { if (Instance == this) { Instance = null; } }
private void Awake() { // Singleton local if (Instance != null) { Destroy(gameObject); } else { Instance = this; } // Reference _inputField = GetComponent <InputField>(); }