public Configruation() { path = FilePaths.getFolderPath("atw_drinkinggame.config"); Settings = new DrinkingSettings(); Debug.Log(path); }
public void Load() { try { if (File.Exists(path)) { string jsonString; using (var reader = new StreamReader(path)) { jsonString = reader.ReadToEnd(); reader.Close(); } Settings = JsonConvert.DeserializeObject <DrinkingSettings>(jsonString); } } catch (Exception e) { Debug.Log("Couldn't properly load settings file! " + e); if (e.InnerException != null) { Debug.Log("Inner Exception: " + e.InnerException); } } }
public DrinkingGame() { _settings = Main.configuration.Settings; }