Exemple #1
0
 /// <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);
 }
Exemple #2
0
 /// <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();
 }
Exemple #3
0
 /// <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();
 }