コード例 #1
0
        public void BlendShapeBindTest()
        {
            var model = new glTF_VRM_BlendShapeBind()
            {
                mesh   = 1,
                weight = 2,
                index  = 3,
            };

            var json = model.ToJson();

            Assert.AreEqual(@"{""mesh"":1,""index"":3,""weight"":2}", json);
            Debug.Log(json);
        }
コード例 #2
0
        public void BlendShapeBindTest()
        {
            var model = new glTF_VRM_BlendShapeBind()
            {
                mesh   = 1,
                weight = 2,
                index  = 3,
            };

            var json = model.ToJson();

            Assert.AreEqual(@"{""mesh"":1,""index"":3,""weight"":2}", json);
            Debug.Log(json);

            var c = new JsonSchemaValidationContext("")
            {
                EnableDiagnosisForNotRequiredFields = true,
            };
            var json2 = JsonSchema.FromType <glTF_VRM_BlendShapeBind>().Serialize(model, c);

            Assert.AreEqual(json, json2);
        }