/// <summary> /// Loads config from file and applies it. Runs in parallel. /// </summary> public static void LoadStart(Action Callback, bool silent = false) { ConfigIO.Instance.LoadStart((ConfigT value) => { Current = value; OnConfigLoad?.Invoke(); Callback?.Invoke(); }, silent); }
/// <summary> /// Loads config from file and applies it. Runs synchronously. /// </summary> public static void Load(bool silent = true) { Current = ConfigIO.Instance.Load(silent); OnConfigLoad?.Invoke(); }
/// <summary> /// Resets the current configuration to the default settings and saves them. /// </summary> public static void ResetConfig(bool silent = false) { ConfigIO.Instance.SaveStart(Defaults, silent); Current = Defaults; OnConfigLoad?.Invoke(); }