From be4f7847b4de7029ce56d510ea796cd63b06d0cf Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Fri, 16 Sep 2022 18:28:45 +0900 Subject: [PATCH] Bone name must be unique in the vrm instance. --- .../Components/Vrm10Runtime/ControlRig/Vrm10ControlBone.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/VRM10/Runtime/Components/Vrm10Runtime/ControlRig/Vrm10ControlBone.cs b/Assets/VRM10/Runtime/Components/Vrm10Runtime/ControlRig/Vrm10ControlBone.cs index c43f742f1..36828b9fb 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Runtime/ControlRig/Vrm10ControlBone.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Runtime/ControlRig/Vrm10ControlBone.cs @@ -58,7 +58,8 @@ namespace UniVRM10 BoneType = boneType; ControlTarget = controlTarget; - ControlBone = new GameObject(boneType.ToString()).transform; + // NOTE: bone name must be unique in the vrm instance. + ControlBone = new GameObject($"{nameof(Vrm10ControlBone)}:{boneType.ToString()}").transform; ControlBone.position = controlTarget.position; InitialControlBoneLocalPosition = ControlBone.localPosition; InitialControlBoneLocalRotation = ControlBone.localRotation;