示例#1
0
 private static T CreateCat <T>(string name) where T : new()
 {
     Preferences.MelonPreferences_ReflectiveCategory cat = MelonPreferences.CreateCategory <T>(name, name);
     cat.SetFilePath(FilePath, printmsg: false);
     cat.SaveToFile(false);
     cat.DestroyFileWatcher();
     return(cat.GetValue <T>());
 }
示例#2
0
 private static T CreateCat <T>(string filePath, string name, bool shouldRemoveOld = false) where T : new()
 {
     if (shouldRemoveOld)
     {
         MelonPreferences.RemoveCategoryFromFile(FilePath, name);
     }
     Preferences.MelonPreferences_ReflectiveCategory cat = MelonPreferences.CreateCategory <T>(name, name);
     cat.SetFilePath(filePath, true, false);
     cat.SaveToFile(false);
     cat.DestroyFileWatcher();
     return(cat.GetValue <T>());
 }