Esempio n. 1
0
        protected void Awake()
        {
            // Fingers

            if (fingers == null || fingers.Length == 0)
            {
                AvatarHelpers.HandModelInit(this);
            }

            // Bones

            bones = AvatarHelpers.GetHandBones(this);

            // Transforms (depends on .bones)

            allTransforms = AvatarHelpers.GetAllTransforms(this);
        }
Esempio n. 2
0
        protected void Awake()
        {
            // Fingers

            if (fingers == null || fingers.Length == 0)
            {
                List <FingerModel> fingerList = new List <FingerModel>();

                if (thumb)
                {
                    fingerList.Add(thumb);
                }
                if (index)
                {
                    fingerList.Add(index);
                }
                if (middle)
                {
                    fingerList.Add(middle);
                }
                if (ring)
                {
                    fingerList.Add(ring);
                }
                if (pinky)
                {
                    fingerList.Add(pinky);
                }

                fingers = fingerList.ToArray();
            }

            for (int i = 0; i < fingers.Length; i++)
            {
                fingers[i].hand = this;
            }

            // Bones

            bones = AvatarHelpers.GetHandBones(this);

            // Transforms (depends on .bones)

            allTransforms = AvatarHelpers.GetAllTransforms(this);
        }