Ejemplo n.º 1
0
 void Update()
 {
     if ((Input.touchCount > 0) && (Input.GetTouch(0).phase == TouchPhase.Began))
     {
         Ray        raycast = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
         RaycastHit raycastHit;
         if (Physics.Raycast(raycast, out raycastHit))
         {
             CommunicatorBridge.message("You just hit the " + raycastHit.collider.name);
         }
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     box = GameObject.Find("box");
     CommunicatorBridge.message("Unity started");
 }