private static bool MapBipedBones(Transform root, ref Transform[] humanToTransform, List<string> report)
{
for (int i = 0; i < HumanTrait.BoneCount; i++)
{
string str = kBipedHumanBoneNames[i];
int parentBone = HumanTrait.GetParentBone(i);
bool flag = HumanTrait.RequiredBone(i);
bool flag2 = (parentBone == -1) || HumanTrait.RequiredBone(parentBone);
Transform transform = (parentBone == -1) ? root : humanToTransform[parentBone];
if ((transform == null) && !flag2)
{
parentBone = HumanTrait.GetParentBone(parentBone);
transform = (parentBone == -1) ? null : humanToTransform[parentBone];
}
if (str != "")
{
humanToTransform[i] = MapBipedBone(i, transform, transform, report);
if ((humanToTransform[i] == null) && flag)
{
return false;
}
}
}
return true;
}