public void ToYaml() { var data = new Data { BaseValue = "Base Value", Bool = true, Int = 15, Float = 10.5F, String = "Text", Data2 = { new Data2 { BaseValue = "Base Value 2", Bool = true, Int = 100, Float = 55.5F, String = "Text2" }, new Data2 { BaseValue = "Base Value 3", Bool = true, Int = 200, Float = 65.5F, String = "Text3" } } }; string yaml = Resources.Load <TextAsset>("Data").text; string result = YamlUtility.ToYaml(data); Assert.AreEqual(yaml, result); Assert.Pass(result); }