void Awake() { //If the instance is null, we set the reference. if (instance == null) { instance = this; } }
private void OnDestroy() { instance = null; }