diff --git a/Scripts/Format/glTF_VRM_Humanoid.cs b/Scripts/Format/glTF_VRM_Humanoid.cs index f73bf1b38..f9510cc51 100644 --- a/Scripts/Format/glTF_VRM_Humanoid.cs +++ b/Scripts/Format/glTF_VRM_Humanoid.cs @@ -75,7 +75,18 @@ namespace VRM } public static HumanBodyBones ToHumanBodyBone(this VRMBone bone) { +#if UNITY_5_6_OR_NEWER return EnumUtil.TryParseOrDefault(bone.ToString()); +#else + if (bone == VRMBone.upperChest) + { + return HumanBodyBones.LastBone; + } + else + { + return EnumUtil.TryParseOrDefault(bone.ToString()); + } +#endif } } @@ -214,7 +225,9 @@ namespace VRM min = x.min, max = x.max, humanBone = x.vrmBone.ToHumanBodyBone(), - }).ToArray(); + }) + .Where(x => x.humanBone!= HumanBodyBones.LastBone) + .ToArray(); return description; } }