Log in or register to post comments

Active script when Image Target is detected

December 7, 2015 - 3:13am #1

Hi!

Can someone tell me how to active a script only when my Image Target object appear and vice versa deactivate when Image Target is not visible? 

 

Active script when Image Target is detected

January 13, 2017 - 2:25pm #3

Lots of ways to do this, here's one:

Take a look at DefaultTrackableEventHandler file and hook into OnTrackingFound and OnTrackingLost.  And put something like this in there:

GameObject.Find("MyGameObject").GetComponent<MyScript>().enabled= false;

 

 

 

Active script when Image Target is detected

January 13, 2017 - 5:59am #2

I have same problem :(

Log in or register to post comments