Hello,
I'm currently working on an application for android using the Vuforia Unity API.
In my use case I am dynamically loading a DataSet and instantiating GameObjects, just like described in this article:
https://developer.vuforia.com/forum/faq/unity-load-dataset-setup-trackables-runtime
However, I'm Instantiating a different augmentation for each TrackableBehaviour.
Here's my problem:
When I hold my camera over the first ImageTarget, I see all augmentations I have instantiated.
When I hold my camera over the second ImageTarget, I see all augmentations, except for the first one.
When I hold my camera over the third ImageTarget, I see all augmentations, except for the first one and the second one.
...
After I have scanned all of the ImageTargets, everything works fine, i.e. I only see the augmentations that I have instantiated for the ImageTarget, when it's tracked.
So it seems as if all augmentations are visible at the beginning until their corresponding ImageTargets have been scanned. Then they are somehow set to invisible and only show when their corresponding ImageTarget is scanned.
Unfortunately I could not yet find a way to solve this problem and I hope someone can tell me what is going on here.
Thanks in advance,
Alex
I fixed it myself.
I fixed it myself.
I had to register a new TrackableEventHandler for every augmentation:
tb.RegisterTrackableEventHandler(new MyDefaultEventHandler(augmentation));
Here's the code of my TrackableEventHandler