MapBipedBones() private static method

private static MapBipedBones ( Transform root, Transform &humanToTransform, List report ) : bool
root UnityEngine.Transform
humanToTransform UnityEngine.Transform
report List
return bool
Beispiel #1
0
 public static bool IsBiped(Transform root, List <string> report)
 {
     if (report != null)
     {
         report.Clear();
     }
     Transform[] array = new Transform[HumanTrait.BoneCount];
     return(AvatarBipedMapper.MapBipedBones(root, ref array, report));
 }
        public static Dictionary <int, Transform> MapBones(Transform root)
        {
            Dictionary <int, Transform> dictionary = new Dictionary <int, Transform>();

            Transform[] array = new Transform[HumanTrait.BoneCount];
            if (AvatarBipedMapper.MapBipedBones(root, ref array, null))
            {
                for (int i = 0; i < HumanTrait.BoneCount; i++)
                {
                    if (array[i] != null)
                    {
                        dictionary.Add(i, array[i]);
                    }
                }
            }
            return(dictionary);
        }
Beispiel #3
0
        public static Dictionary <int, Transform> MapBones(Transform root)
        {
            Dictionary <int, Transform> dictionary = new Dictionary <int, Transform>();

            Transform[] humanToTransform = new Transform[HumanTrait.BoneCount];
            if (AvatarBipedMapper.MapBipedBones(root, ref humanToTransform, (List <string>)null))
            {
                for (int key = 0; key < HumanTrait.BoneCount; ++key)
                {
                    if ((Object)humanToTransform[key] != (Object)null)
                    {
                        dictionary.Add(key, humanToTransform[key]);
                    }
                }
            }
            return(dictionary);
        }
Beispiel #4
0
        public static Dictionary <int, Transform> MapBones(Transform root)
        {
            Dictionary <int, Transform> dictionary = new Dictionary <int, Transform>();

            Transform[] array = new Transform[HumanTrait.BoneCount];
            if (AvatarBipedMapper.MapBipedBones(root, ref array, null))
            {
                for (int i = 0; i < HumanTrait.BoneCount; i++)
                {
                    if (array[i] != null)
                    {
                        dictionary.Add(i, array[i]);
                    }
                }
            }
            if (!dictionary.ContainsKey(8) && dictionary.ContainsKey(54))
            {
                dictionary.Add(8, dictionary[54]);
                dictionary.Remove(54);
            }
            return(dictionary);
        }