private void SetCurrentColor(Color c) { FieldInfo toEdit = typeof(VisualsSettings).GetRuntimeField(SelectedColorParameter); toEdit?.SetValue(editSettings.VisualSettings, c); VisualsSettings.ApplyVisuals(editSettings.VisualSettings); }
private static void LoadSettings() { try { RuntimeSettings = JsonUtilities.Deserialize <ProgramSettings>(File.ReadAllText(ProgramSettings.SaveSettingsDirectory + @"\settings.txt")); VisualsSettings.ApplyVisuals(RuntimeSettings.VisualSettings); } catch { Reset(); } }
public static void Reset() { RuntimeSettings = new ProgramSettings(); VisualsSettings.ApplyVisuals(RuntimeSettings.VisualSettings); SaveSettings(); }