void Awake() { if (instance && instance != this) { Destroy(gameObject); } else { DontDestroyOnLoad(gameObject); instance = this; } }
public void OnDrawGizmos() { instance = this; if (EditorPrefs.GetBool(APGlobals.ShouldRefreshHotkeys)) { EditorPrefs.SetBool(APGlobals.ShouldRefreshHotkeys, false); shouldResetHotKeys = true; } if (shouldResetHotKeys) { shouldResetHotKeys = false; SaveAllHotKeys(); } if (shouldResetAssets) { Refresh(); } UpdateSelectedAsset(); }