Пример #1
0
 private void RefreshController(PXR_Input.Controller hand)
 {
     if (PXR_Input.IsControllerConnected(hand))
     {
         if (systemOrLocal == 0)
         {
             LoadControllerFromPrefab(hand);
             if (!loadModelSuccess)
             {
                 LoadControllerFromSystem((int)hand);
             }
         }
         else
         {
             var isControllerExist = false;
             foreach (Transform t in transform)
             {
                 if (t.name == modelName)
                 {
                     isControllerExist = true;
                 }
             }
             if (!isControllerExist)
             {
                 LoadControllerFromSystem((int)hand);
                 if (!loadModelSuccess)
                 {
                     LoadControllerFromPrefab(hand);
                 }
             }
             else
             {
                 var currentController = transform.Find(modelName);
                 currentController.gameObject.SetActive(true);
             }
         }
         PXR_ControllerKeyTips.RefreshTips();
     }
 }
 private void Awake()
 {
     toolTips = transform.GetComponent <PXR_ControllerKeyTips>();
 }