Esempio n. 1
0
 public void SetRenderModel(RenderModelHolder prefabs)
 {
     /*
      *
      * for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
      * {
      *  Hand hand = Player.instance.hands[handIndex];
      *  if (hand != null)
      *  {
      *      if (hand.handType == SteamVR_Input_Sources.RightHand)
      *          hand.SetRenderModel(prefabs.rightPrefab);
      *      if (hand.handType == SteamVR_Input_Sources.LeftHand)
      *          hand.SetRenderModel(prefabs.leftPrefab);
      *  }
      * }
      */
 }
 public void SetRenderModel(RenderModelHolder prefabs)
 {
     for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
     {
         Hand hand = Player.instance.hands[handIndex];
         if (hand != null)
         {
             if (hand.handType == SteamVR_Input_Sources.RightHand)
             {
                 hand.SetRenderModel(prefabs.rightPrefab);
             }
             if (hand.handType == SteamVR_Input_Sources.LeftHand)
             {
                 hand.SetRenderModel(prefabs.leftPrefab);
             }
         }
     }
 }