public static ILConfig DeserializeFromString(string configString)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(ILConfig));
            TextReader    reader     = new StringReader(configString);
            ILConfig      config     = (ILConfig)serializer.Deserialize(reader);

            return(config);
        }
        public static ILConfig DeserializeFromPath(string path)
        {
            FileInfo info = new FileInfo(path);

            if (!info.Exists)
            {
                return(null);
            }

            XmlSerializer serializer = new XmlSerializer(typeof(ILConfig));
            FileStream    stream     = new FileStream(path, FileMode.Open);

            ILConfig config = (ILConfig)serializer.Deserialize(stream);

            stream.Close();

            return(config);
        }
Exemple #3
0
 private static void LMColorPicker(string name, ref ILConfig.LMColor color, string tooltip)
 {
     Color c = EditorGUILayout.ColorField(new GUIContent(name, tooltip), new Color(color.r, color.g, color.b, color.a), GUILayout.Width(220));
     color = new mset.ILConfig.LMColor(c.r, c.g, c.b, c.a);
 }