"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Could not deactivate dataset error when toggling VuforiaBehaviour.Instance.enable

In an attempt to optimize for mobile, I'm toggling the VuforiaBehaviour.Instance.enabled specifically when it is needed (usually for ground tracking). At the end of the game I need to load in a target dataset (of 14 object targets, each 10-20mb, only 5 are needed during a playthrough) and I have followed the various methods for dynamically creating object trackables at runtime. https://forum.unity.com/threads/vuforia-unity-database-load-problem.531057/ https://library.vuforia.com/content/vuforia-library/en/articles/Solution/How-To-Use-Object-Recognition-in-Unity.html https://library.vuforia.com/content/vuforia-library/en/articles/Solution/how-to-create-and-load-targets-in-unity.html https://answers.unity.com/questions/1357209/could-not-initialize-the-tracker-after-building-ex.html?childToView=1449502#answer-1449502 https://old.reddit.com/r/Vuforia/comments/9v8y7a/dynamically_activate_dataset_including_multiple/ The problem comes when "VuforiaBehaviour.Instance.enabled = false" is called, it throws the "Could not deactivate dataset" error from that line.

I have attempted to deactivate the datasets manually, and event destroy all the trackables and start over each time vuforia is toggled, but the error persists.

Since I imagine this is because I am not relying on the native dataset functions, is there a method of manually toggling the vuforia behaviour?

Perhaps there is a better way of creating the 5 needed object targets upon the game start?

I should also mention that they are assigned randomly, so I have tried including all of the object targets created manually in the hierarchy, and then deactivating the ones that aren't needed, but that seems to create duplicate object targets during runtime from the native vuforia behaviour and cause a fair amount of lag.

Hi,

Could you please let me know which Unity/Vuforia version are you using?

TVW

Fri, 06/26/2020 - 16:35

In reply to by mcotora

Thanks for the questions!

Unity 2019.2.21f1
Vuforia 9.2.7

The total dataset contains 15 objects, and we only need to use 5 during a single playthrough. I'm hesitant to load all 15 for each playthrough, unless the resources required is negligible.