diff --git a/Packages/net.fushizen.modular-avatar/Editor/MergeArmatureHook.cs b/Packages/net.fushizen.modular-avatar/Editor/MergeArmatureHook.cs index c7bb6568..ae9d44d4 100644 --- a/Packages/net.fushizen.modular-avatar/Editor/MergeArmatureHook.cs +++ b/Packages/net.fushizen.modular-avatar/Editor/MergeArmatureHook.cs @@ -56,7 +56,7 @@ namespace net.fushizen.modular_avatar.core.editor UnityEngine.Object.DestroyImmediate(mergeArmature); } - foreach (var renderer in avatarGameObject.transform.GetComponentsInChildren()) + foreach (var renderer in avatarGameObject.transform.GetComponentsInChildren(true)) { var bones = renderer.bones; for (int i = 0; i < bones.Length; i++) bones[i] = MapBoneReference(bones[i], Retargetable.Ignore); @@ -65,25 +65,25 @@ namespace net.fushizen.modular_avatar.core.editor renderer.probeAnchor = MapBoneReference(renderer.probeAnchor); } - foreach (var c in avatarGameObject.transform.GetComponentsInChildren()) + foreach (var c in avatarGameObject.transform.GetComponentsInChildren(true)) { if (c.rootTransform == null) c.rootTransform = c.transform; UpdateBoneReferences(c); } - foreach (var c in avatarGameObject.transform.GetComponentsInChildren()) + foreach (var c in avatarGameObject.transform.GetComponentsInChildren(true)) { if (c.rootTransform == null) c.rootTransform = c.transform; UpdateBoneReferences(c); } - foreach (var c in avatarGameObject.transform.GetComponentsInChildren()) + foreach (var c in avatarGameObject.transform.GetComponentsInChildren(true)) { if (c.rootTransform == null) c.rootTransform = c.transform; UpdateBoneReferences(c); } - foreach (var c in avatarGameObject.transform.GetComponentsInChildren()) + foreach (var c in avatarGameObject.transform.GetComponentsInChildren(true)) { if (!AddedConstraints.Contains(c)) {