diff --git a/Assets/UniGLTF/Runtime/UniHumanoid/IO/BvhImporterContext.cs b/Assets/UniGLTF/Runtime/UniHumanoid/IO/BvhImporterContext.cs index 8bdafda8f..f50f4f577 100644 --- a/Assets/UniGLTF/Runtime/UniHumanoid/IO/BvhImporterContext.cs +++ b/Assets/UniGLTF/Runtime/UniHumanoid/IO/BvhImporterContext.cs @@ -116,6 +116,8 @@ namespace UniHumanoid AvatarDescription = description; var animator = Root.AddComponent(); animator.avatar = Avatar; + + Root.AddComponent(); } static Transform BuildHierarchy(Transform parent, BvhNode node, float toMeter) diff --git a/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs b/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs index 893d31ead..04942584a 100644 --- a/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs +++ b/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs @@ -226,7 +226,10 @@ namespace VRM.SimpleViewer context.Parse(path, source); context.Load(); m_src = context.Root.GetComponent(); - m_src.GetComponent().enabled = false; + if (m_src == null) + { + throw new ArgumentNullException(); + } m_loaded?.EnableBvh(m_src); }