public void Serialize(string filename, AFBW_Settings config)
        {
            //Debug.Log("Serialize, filename: " + filename);
            var serializer = new XmlSerializer(typeof(AFBW_Settings));

            using (var writer = new StreamWriter(filename))
            {
                serializer.Serialize(writer, config);
            }
        }
        private void LoadState(ConfigNode configNode)
        {
            var s = settings.Deserialize(GetAbsoluteSettingsPath());

            if (s != null)
            {
                settings = s;
            }
            m_Configuration = Configuration.Deserialize(GetAbsoluteConfigurationPath());
            if (m_Configuration == null)
            {
                m_Configuration = new Configuration();
                Configuration.Serialize(GetAbsoluteSettingsPath(), m_Configuration);
            }

            m_FlightManager.m_Configuration = m_Configuration;
        }