コード例 #1
0
 public static void Init()
 {
     //Check if the asset exists
     _settings = Resources.Load <QuickSettingsAsset>("QuickSettingsCustom");
     if (_settings == null)
     {
         _settings = ScriptableObject.CreateInstance <QuickSettingsAsset>();
     }
 }
コード例 #2
0
        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());
        }