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); return(cat.GetValue <T>()); }
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>()); }