Пример #1
0
 private void OnEnable()
 {
     if (instance != this)
     {
         if (instance != null)
         {
             enabled = false;
         }
         else
         {
             instance = this;
         }
     }
 }
        private void Update()
        {
            var rigData = MultiplayerRoom.GetRigDataFromID(id);


            if (rigData.quality >= 1)
            {
                SetTransformToPose(headRep, rigData.Head);
            }
            if (rigData.quality >= 2)
            {
                SetTransformToPose(leftHandRep, rigData.Left);
                SetTransformToPose(rightHandRep, rigData.Right);
            }
            if (rigData.quality >= 3)
            {
                SetTransformToPose(leftShoulderRep, rigData.LeftShoulder);
                SetTransformToPose(rightShoulderRep, rigData.RightShoulder);
                SetTransformToPose(leftElbowRep, rigData.LeftElbow);
                SetTransformToPose(rightElbowRep, rigData.RightElbow);
            }
        }