public static HumanBodyBones ToUnity(this VrmLib.HumanoidBones bone) { if (bone == VrmLib.HumanoidBones.unknown) { return(HumanBodyBones.LastBone); } return(VrmLib.EnumUtil.Cast <HumanBodyBones>(bone)); }
static void AssignHumanoid(List <VrmLib.Node> nodes, UniGLTF.Extensions.VRMC_vrm.HumanBone humanBone, VrmLib.HumanoidBones key) { if (nodes == null) { throw new ArgumentNullException("nodes"); } if (humanBone != null && humanBone.Node.HasValue) { var index = humanBone.Node.Value; if (index >= 0 && index < nodes.Count) { nodes[index].HumanoidBone = key; } else { throw new IndexOutOfRangeException("AssignHumanoid"); } } }
static void AssignHumanoid(List <VrmLib.Node> nodes, UniGLTF.Extensions.VRMC_vrm.HumanBone humanBone, VrmLib.HumanoidBones key) { if (humanBone != null && humanBone.Node.HasValue) { nodes[humanBone.Node.Value].HumanoidBone = key; } }