Merge pull request #200 from dwango/extensions_VRM_default_null

glTF.extensions.VRM default value to null
This commit is contained in:
ousttrue 2019-02-28 14:22:23 +09:00 committed by GitHub
commit 293cdcce5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -16,11 +16,13 @@ namespace VRM
public VRMExporter(glTF gltf) : base(gltf)
{
gltf.extensionsUsed.Add(glTF_VRM_extensions.ExtensionName);
gltf.extensions.VRM = new glTF_VRM_extensions();
}
public new static glTF Export(GameObject go)
{
var gltf = new glTF();
using (var exporter = new VRMExporter(gltf)
{
#if VRM_EXPORTER_USE_SPARSE

View File

@ -7,12 +7,15 @@ namespace UniGLTF
{
public partial class glTF_extensions : ExtensionsBase<glTF_extensions>
{
public VRM.glTF_VRM_extensions VRM = new VRM.glTF_VRM_extensions();
public VRM.glTF_VRM_extensions VRM;
[JsonSerializeMembers]
void VRMSerializeMembers(GLTFJsonFormatter f)
{
f.Key("VRM"); f.GLTFValue(VRM);
if (VRM != null)
{
f.Key("VRM"); f.GLTFValue(VRM);
}
}
}
}