From ac66daab25f5ced52b288cda8f7546d7e0441488 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 28 Nov 2018 15:45:13 +0900 Subject: [PATCH] Updated UniJSON --- Scripts/Format/Editor/VRMVersionMenu.cs | 6 +++--- Scripts/Format/glTF_VRM_Material.cs | 6 +++--- UniGLTF | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Scripts/Format/Editor/VRMVersionMenu.cs b/Scripts/Format/Editor/VRMVersionMenu.cs index c3c4d82a7..9372c7be6 100644 --- a/Scripts/Format/Editor/VRMVersionMenu.cs +++ b/Scripts/Format/Editor/VRMVersionMenu.cs @@ -82,7 +82,7 @@ namespace VRM var subFormatter = new JsonFormatter(4); subFormatter.BeginMap(); - foreach (var _kv in node.ObjectItems) + foreach (var _kv in node.ObjectItemsRaw) { subFormatter.Key(_kv.Key); Traverse(_kv.Value, subFormatter, dir); @@ -102,7 +102,7 @@ namespace VRM { case JsonValueType.Array: f.BeginList(); - foreach(var x in node.ArrayItems) + foreach(var x in node.ArrayItemsRaw) { TraverseItem(x, f, dir); } @@ -113,7 +113,7 @@ namespace VRM //Debug.LogFormat("title: {0}", title); { f.BeginMap(); - foreach (var kv in node.ObjectItems) + foreach (var kv in node.ObjectItemsRaw) { f.Key(kv.Key); TraverseItem(kv.Value, f, dir); diff --git a/Scripts/Format/glTF_VRM_Material.cs b/Scripts/Format/glTF_VRM_Material.cs index 664a701da..8a24bb7d2 100644 --- a/Scripts/Format/glTF_VRM_Material.cs +++ b/Scripts/Format/glTF_VRM_Material.cs @@ -91,15 +91,15 @@ namespace VRM public static List Parse(JsonNode json) { var materials = json.DeserializeList(); - var jsonItems = json.ArrayItems.ToArray(); + var jsonItems = json.ArrayItemsRaw.ToArray(); for (int i = 0; i < materials.Count; ++i) { materials[i].floatProperties = - jsonItems[i]["floatProperties"].ObjectItems.ToDictionary(x => x.Key, x => x.Value.Value.GetSingle()); + jsonItems[i]["floatProperties"].ObjectItems.ToDictionary(x => x.Key, x => x.Value.GetSingle()); materials[i].vectorProperties = jsonItems[i]["vectorProperties"].ObjectItems.ToDictionary(x => x.Key, x => { - return x.Value.ArrayItems.Select(y => y.Value.GetSingle()).ToArray(); + return x.Value.ArrayItems.Select(y => y.GetSingle()).ToArray(); }); materials[i].keywordMap = jsonItems[i]["keywordMap"].ObjectItems.ToDictionary(x => x.Key, x => x.Value.GetBoolean()); diff --git a/UniGLTF b/UniGLTF index c49fb752b..0bc6a981d 160000 --- a/UniGLTF +++ b/UniGLTF @@ -1 +1 @@ -Subproject commit c49fb752bf146fdaed56cfe2655cd45bbefdf83b +Subproject commit 0bc6a981d23bdb6b67f49ded05102f52377943d7