private static bool TryLoadConfig() { try { //Config = _stateManager.LoadOnionState(); JsonLoader.TryLoadConfiguration(Paths.GetModsPath() + System.IO.Path.DirectorySeparatorChar + "OnionPatches" + Path.DirectorySeparatorChar + "Config" + System.IO.Path.DirectorySeparatorChar + "OnionPatchesState.json", out _config); _logger.Log("OnionState.json loaded"); return(true); } catch { Config = new OnionState(); const string Message = "OnionState.json loading failed"; _logger.Log(Message); Debug.LogError(Message); return(false); } }
public bool TryReloadConfiguratorState() { //if (!JsonLoader.TryLoadConfiguratorState(out MaterialColorState state)) T state; if (!JsonLoader.TryLoadConfiguration(this.StateFilePath, out state)) { return(false); } State = state; return(true); }