I find myself struggling on how to detect (via code) when specific image targets have been activated, or detected, or scanned, instantiated, whatever is the proper term for when the object is tracked to the image you have in your database. For example if I have 5 different image targets and I want to keep track of how many times each of them have been activated, how can I do this via code?
I know there is "OnTrackingFound" found in "DefaultTrackableEventHandler" however this is for all activated ImageTargets and does not take into account individual ones.
I dont believe there is such a function in the vuforia api so I think this will have to be achieved via some sort of bools in the code but I dont know how to do that either for the same reasons as the title, that I dont know how to detect if an image target has been activated. I cannot put some bool on the Start() method either since those just activate on application launch anyway and not when they are spawned via imageTarget recognition.
Hi,
you could write a script like this:
and call it from OnTargetFound of each Image Target.
I hope that helps.