Hi all,
I am wondering how can I add and activate datasets from the file after some image target is found? I'd also like to deactivate/unload that database loaded after the target, which previously triggers to add the dataset, is lost.
The reason I want to do this is that I have a fairly large amount of images to be recognized by the AR camera, and I don't want my program to have all the image target added. I'd like to build up a tree. Only when you have detected all the ancestors(image targets), can you detect the leaves(image targets).
I have tried some method, trying to insert the code in the following page:
https://developer.vuforia.com/forum/faq/unity-load-dataset-setup-trackables-runtime
to the OnTrackingFound() function in the Default Trackable Event Handler component of the image target. But it raises an error:
Exception in the callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
Can anyone have some suggestions on how to solve it? Thanks in advance for the help.
As shown in the attachment, I'd like to have DinosaurBack.jpg detected first and then load the some dataset and recognized what is in the blank area like DinosaurTrex.jpg. (the expected outcome is only scan DinosaurTrex.jpg and get the result)
Hello,
Hello,
I cannot think of any reason why you could not do this. However, I'm wondering if your code is actually working correctly.
Hi,
Hi,
I'd like to ask can I load/modify a dataset while some target is tracked within OnTrackingFound() Function? Or there is something prevent me from changing the dataset while it is being tracked?
Hello,
Hello,
You can find reference code for loading a dataset using Vuforia APIs in the 8.3 version of the Core Samples: /Assets/SamplesResources/SceneAssets/ModelTargets/Scripts/ModelTargetsManager.cs