mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-08 05:04:06 -05:00
Merge pull request #2014 from ousttrue/fix/simple_viewer
[sample] SimpleViewer を修復(BvhImporterContext の挙動変更に追随)
This commit is contained in:
commit
2ba557cfe5
|
|
@ -116,6 +116,8 @@ namespace UniHumanoid
|
|||
AvatarDescription = description;
|
||||
var animator = Root.AddComponent<Animator>();
|
||||
animator.avatar = Avatar;
|
||||
|
||||
Root.AddComponent<HumanPoseTransfer>();
|
||||
}
|
||||
|
||||
static Transform BuildHierarchy(Transform parent, BvhNode node, float toMeter)
|
||||
|
|
|
|||
|
|
@ -226,7 +226,10 @@ namespace VRM.SimpleViewer
|
|||
context.Parse(path, source);
|
||||
context.Load();
|
||||
m_src = context.Root.GetComponent<HumanPoseTransfer>();
|
||||
m_src.GetComponent<Renderer>().enabled = false;
|
||||
if (m_src == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
m_loaded?.EnableBvh(m_src);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user