protected override void Awake() { base.Awake(); //If another instance was already open, close it. if (instance != null) { Destroy(instance.gameObject); } instance = this; }
protected override void OnDestroy() { base.OnDestroy(); CleanUpCallbacks(UnityLogic.Options.ViewMode); UnityLogic.Options.OnChanged_ViewMode -= Callback_NewViewMode; TileHighlighter.Instance.DestroyHighlight(tileHighlight); if (instance == this) { instance = null; } }