mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 13:54:45 -05:00
シーン構成によっては、稀にエラーになるっぽい? #1592
例えば、エクスポート対象ヒエラルキーの外部の GameObject が rootBone セットされている
This commit is contained in:
@@ -424,7 +424,10 @@ namespace UniGLTF.MeshUtility
|
||||
dstRenderer.sharedMaterials = srcRenderer.sharedMaterials;
|
||||
if (srcRenderer.rootBone != null)
|
||||
{
|
||||
dstRenderer.rootBone = boneMap[srcRenderer.rootBone];
|
||||
if (boneMap.TryGetValue(srcRenderer.rootBone, out Transform found))
|
||||
{
|
||||
dstRenderer.rootBone = found;
|
||||
}
|
||||
}
|
||||
dstRenderer.bones = dstBones;
|
||||
dstRenderer.sharedMesh = mesh;
|
||||
|
||||
Reference in New Issue
Block a user