public void FromYaml() { string yaml = Resources.Load <TextAsset>("Data").text; var result = YamlUtility.FromYaml <Data>(yaml); Assert.NotNull(result); Assert.True(result.Bool); Assert.AreEqual("Base Value", result.BaseValue); Assert.AreEqual(15, result.Int); Assert.AreEqual(10.5F, result.Float); Assert.AreEqual("Text", result.String); Assert.AreEqual(2, result.Data2.Count); Assert.AreEqual("Base Value 2", result.Data2[0].BaseValue); Assert.True(result.Data2[0].Bool); Assert.AreEqual(100, result.Data2[0].Int); Assert.AreEqual(55.5F, result.Data2[0].Float); Assert.AreEqual("Text2", result.Data2[0].String); Assert.AreEqual("Base Value 3", result.Data2[1].BaseValue); Assert.True(result.Data2[1].Bool); Assert.AreEqual(200, result.Data2[1].Int); Assert.AreEqual(65.5F, result.Data2[1].Float); Assert.AreEqual("Text3", result.Data2[1].String); }