Exemple #1
0
        public static SceneAnim FromJson(string Name)
        {
            AnimConfig config = JsonConvert.DeserializeObject <AnimConfig>(
                System.IO.File.ReadAllText(Name));

            return(config.FromYaml());
        }
Exemple #2
0
        public static MaterialAnim FromYaml(string Name)
        {
            var serializerSettings = new SerializerSettings()
            {
                // EmitTags = false
            };

            serializerSettings.DefaultStyle          = YamlStyle.Any;
            serializerSettings.ComparerForKeySorting = null;
            serializerSettings.RegisterTagMapping("AnimConfig", typeof(AnimConfig));

            var        serializer = new Serializer(serializerSettings);
            AnimConfig config     = serializer.Deserialize <AnimConfig>(File.ReadAllText(Name));

            return(config.FromYaml());
        }