private void OnDisable() { if (_openWindow == this) { _openWindow = null; } }
private void OnEnable() { if (_openWindow == null) { _openWindow = this; } else { Object.DestroyImmediate(this); } this.titleContent = new GUIContent("SP Settings"); _gameSettings = AssetDatabase.LoadAssetAtPath(GameSettings.PATH_DEFAULTSETTINGS_FULL, typeof(GameSettings)) as GameSettings; _timeLayersData = AssetDatabase.LoadAssetAtPath(CustomTimeLayersData.PATH_DEFAULTSETTINGS_FULL, typeof(CustomTimeLayersData)) as CustomTimeLayersData; }