Exemple #1
0
 void Update()
 {
     if (GameObject.Find(UnityXR.gameObject.name))
     {
         GetComponent <VRTK_UICanvas>().enabled = true;
         LeftMove.SetActive(false);
         RightMove.SetActive(false);
         Plus.SetActive(true);
         Minus.SetActive(true);
         for (int i = 0; i < Keyboard.Length; i++)
         {
             Keyboard[i].SetActive(true);
         }
     }
     else
     {
         GetComponent <VRTK_UICanvas>().enabled = false;
         LeftMove.SetActive(true);
         RightMove.SetActive(true);
         Plus.SetActive(false);
         Minus.SetActive(false);
         for (int i = 0; i < Keyboard.Length; i++)
         {
             Keyboard[i].SetActive(false);
         }
     }
 }