Skip to content

Commit

Permalink
Merge pull request #353 from hiroj/fix_genSerializer_node_children
Browse files Browse the repository at this point in the history
Fixed not to output empty children
  • Loading branch information
ousttrue authored Dec 26, 2019
2 parents e642c76 + 4a2c364 commit 4beb8d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class Generator : IDisposable
{"gltf/nodes[]/camera", "if(value.camera!=-1)"},
{"gltf/nodes[]/mesh", "if(value.mesh!=-1)"},
{"gltf/nodes[]/skin", "if(value.skin!=-1)"},
{"gltf/nodes[]/children", "if(value.children.Length>0)"},
{"gltf/skins[]/skeleton", "if(value.skeleton!=-1)"},
{"gltf/extensionsRequired", "if(false)"},
{"gltf/extensions/VRM/humanoid/humanBones[]/axisLength", "if(value.axisLength>0)"},
Expand Down
2 changes: 1 addition & 1 deletion Assets/VRM/UniGLTF/Scripts/IO/FormatterExtensionsGltf.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ public static void GenSerialize(this IFormatter f, glTFNode value)
f.Key("name"); f.GenSerialize(value.name);
}

if(value.children!=null)
if(value.children.Length>0)
{
f.Key("children"); f.GenSerialize(value.children);
}
Expand Down

0 comments on commit 4beb8d5

Please sign in to comment.