By saiunity
on Wed, 01/17/2018 - 10:08
Hi, everything works awesome with model targets , but I got an issues, I'm not be use multiple model targets in one application.
When i enable two DataSets in vuforia configuration, only one works, is there any way to load data sets run-time? or i can use multiple model Targets in the first place?
Hello saiunity,
Hello saiunity,
You can only have a single Model Target dataset activated at a time. You can load multiple datasets as needed, but if you'd like to use a different dataset you'll have to de-activate the first dataset and activate the second one.
Thanks,
Vuforia Support
Hi Strasza,
Hi Strasza,
Exactly, I need the API or sample code, it will be great if, i will be guided to some detailed explanation
Regards,
saikiran
Hello again,
Hello again,
Please refer to this documentation: https://library.vuforia.com/articles/Solution/model-targets-workflow.html
Thanks,
Vuforia Support
Hi,
Hi,
I can't find unity API there, can you please share a small script regarding loading & activating multiple Model Target Data bases may be something like onbutton click. It will be really helpful.
Thank you,
saikiran
Hi saikiran,
Hi Saikiran,
I actually did this a few days ago for the HoloLens, but you can use the most part of the code. Just change some events and you are done.
(I tried to use a coroutine so the frame won't freeze, but it seems like it doesn't work)
saiunity wrote:
[quote=saiunity]
Hi,
I can't find unity API there, can you please share a small script regarding loading & activating multiple Model Target Data bases may be something like onbutton click. It will be really helpful.
Thank you,
Hi,
Hi,
I was able to solve it now.
I was able to solve it now. Supposed you have a main menu scene with a list of 3d targets you want to load dynamically...
- Deactivate the Vuforia Behaviour for this scene
So we have to change scene to
So we have to change scene to change target? Is there no way to do it in the same scene?
I'll try do my own tests on the matter in the next days but an official response would be great :)
I guess, it also works in the
I guess, it also works in the same scene (but haven't tried it yet). Most important thing is to stop the objectTracker before changing the dataset and then start it again.
can you help me how to stop
can you help me how to stop object tracker and activate it
Hello,
Hello,
Please review our APIs: https://library.vuforia.com/content/vuforia-library/en/reference/unity/classVuforia_1_1ObjectTracker.html
Thanks,
Vuforia Engine Support
pflamant wrote:
[quote=pflamant]
So we have to change scene to change target? Is there no way to do it in the same scene?
I'll try do my own tests on the matter in the next days but an official response would be great :)
[/quote]
Okay, I'll try it :)
Okay, I'll try it :)
Thanks for the answer
This is a modified and
This is a modified and smaller version of Jari333's solution.
Works for me on Unity Version 2018.2.14f1, 64bit, Vuforia Version 7.5.20. Other versions might work as well, but I didn't test them.