private void SerializeData() { var stream = new YamlStream(); string input = TestYaml.GetFileContextByPath("Assets/Res/spriteRelate.txt"); stream.Load(new StringReader(input)); var deserializer = new DeserializerBuilder() .WithNamingConvention(new NullNamingConvention()) .Build(); SpriteDataClass order = deserializer.Deserialize <SpriteDataClass>(input); int a = 0; }
private void newSeri() { string input = TestYaml.GetFileContextByPath("Assets/TileInfo/Brick.prefab"); var stream = new YamlStream(); stream.Load(new StringReader(input)); var deserializer = new DeserializerBuilder() .WithNamingConvention(new CamelCaseNamingConvention()) .Build(); //var prefs = deserializer.Deserialize<YOUR_TYPE>( // new EventStreamParserAdapter( // YamlNodeToEventStreamConverter.ConvertToEventStream(stream) // ) //); int a = 0; }