/// <summary> /// Loads the preferences the user has entered as XML /// </summary> private void LoadPreferenceData() { prefs = new SkyBoxPreference(); if (File.Exists(Path.Combine(this.folder, "preference.xml"))) { try { System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(prefs.GetType()); System.IO.StreamReader file = new System.IO.StreamReader(Path.Combine(this.folder, "preference.xml")); prefs = (SkyBoxPreference)reader.Deserialize(file); file.Close(); } catch (System.Exception e) { Debug.LogException(e); } } }
/// <summary> /// Loads the preferences the user has entered as XML /// </summary> private void LoadPreferenceData() { prefs = new SkyBoxPreference(); if( File.Exists(Path.Combine(this.folder, "preference.xml")) ) { try { System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(prefs.GetType()); System.IO.StreamReader file = new System.IO.StreamReader(Path.Combine(this.folder, "preference.xml")); prefs = (SkyBoxPreference) reader.Deserialize(file); file.Close(); } catch (System.Exception e) { Debug.LogException(e); } } }