public static void Init() { //Check if the asset exists _settings = Resources.Load <QuickSettingsAsset>("QuickSettingsCustom"); if (_settings == null) { _settings = ScriptableObject.CreateInstance <QuickSettingsAsset>(); } }
private static void GetWindowPlayerPrefs() { EditorWindow.GetWindow <QuickPlayerPrefsWindowEditor>(); string path = "Assets/QuickVRCfg/Resources/QuickSettingsCustom.asset"; QuickSettingsAsset settings = AssetDatabase.LoadAssetAtPath <QuickSettingsAsset>(path); if (!settings) { settings = ScriptableObject.CreateInstance <QuickSettingsAsset>(); QuickUtilsEditor.CreateDataFolder("QuickVRCfg/Resources"); AssetDatabase.CreateAsset(settings, path); AssetDatabase.SaveAssets(); } QuickPlayerPrefs.Init(); //Check if the base settings are defined SettingsBase.SetSubjectID(SettingsBase.GetSubjectID()); SettingsBase.SetGender(SettingsBase.GetGender()); SettingsBase.SetLanguage(SettingsBase.GetLanguage()); }