mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-09 04:01:35 -05:00
use HumanBodyBones
This commit is contained in:
parent
db33257326
commit
84aee423ac
|
|
@ -22,13 +22,13 @@ namespace UniHumanoid
|
|||
|
||||
struct BoneTraitName
|
||||
{
|
||||
public string WithoutSpace;
|
||||
public HumanBodyBones Bone;
|
||||
public string TraitName;
|
||||
|
||||
public BoneTraitName(string name)
|
||||
{
|
||||
TraitName = name;
|
||||
WithoutSpace = name.Replace(" ", "");
|
||||
Bone = (HumanBodyBones)Enum.Parse(typeof(HumanBodyBones), name.Replace(" ", ""));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -68,10 +68,9 @@ namespace UniHumanoid
|
|||
return result;
|
||||
}
|
||||
|
||||
var boneNameWithoutSpace = b.ToString();
|
||||
foreach (var x in cashedHumanTraitBoneName)
|
||||
{
|
||||
if (x.WithoutSpace == boneNameWithoutSpace)
|
||||
if (x.Bone == b)
|
||||
{
|
||||
cachedHumanBodyBonesToBoneTraitNameMap[b] = x.TraitName;
|
||||
return x.TraitName;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user