private int createTransforms(Transform parent, int index, Transform[] boneList)
 {
     if (boneList != null)
     {
         boneList[index] = parent;
     }
     RigDefinition.Bone bone = this.Bones[index++];
     for (int i = 0; i < bone.ChildCount; i++)
     {
         Transform parent2 = this.Bones[index].ToTransform(parent);
         index = this.createTransforms(parent2, index, boneList);
     }
     return(index);
 }
        public int FindBoneIndex(RigDefinition.Bone rhsBone)
        {
            Assert.IsNotNull <RigDefinition.Bone>(rhsBone);
            Assert.IsNotNull <RigDefinition.Bone[]>(this.Bones);
            int num = this.Bones.Length;

            for (int i = 0; i < num; i++)
            {
                RigDefinition.Bone bone = this.Bones[i];
                if (bone.Name == rhsBone.Name)
                {
                    num = i;
                }
            }
            return(num);
        }