// Update is called once per frame
 void Update()
 {
     MagicLeapTools.Pointer pointer = gameObject.GetComponent <MagicLeapTools.Pointer>();
     if (pointer.Target != null)
     {
         Debug.Log("got game object" + pointer.Target.tag.ToString());
         TagFound(pointer.Target.tag.ToString());
     }
     else
     {
         Debug.Log("nothing found");
     }
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     MagicLeapTools.Pointer pointer = gameObject.GetComponent <MagicLeapTools.Pointer>();
     if (pointer.Target != null)
     {
         if (pointer.Target.tag == "Win")
         {
             SceneManager.LoadScene(1);
         }
         else
         {
             Debug.Log(message: "blah");
         }
     }
     else
     {
         Debug.Log(message: "No target detected");
     }
 }
Пример #3
0
 //Init:
 private void Reset()
 {
     //refs:
     controlInput = GetComponent <ControlInput>();
     pointer      = GetComponent <Pointer>();
 }
 //Init:
 private void Reset()
 {
     //refs:
     pointer = transform.parent.GetComponent <Pointer>();
 }