private void SaveConfiguration() { var countryInfos = new CountryInfoList { CountryInfos = Countries.Values.ToList() }; var fileContents = JsonProcessor.SerializeObject(countryInfos, indented: true); JsonFileHelper.SaveFileContents(_configurationFilePath, fileContents); }
public void Awake() { if (m_Instance == null) { m_Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(this); } //getting local jsonFile jsonstring = JsonFileToString(path); countryInfoList = JsonUtility.FromJson <CountryInfoList>(jsonstring); }