Log in or register to post comments

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

June 25, 2020 - 3:08pm #1

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.

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

June 26, 2020 - 9:35am #3

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.

Currently though, loading any dataset (using the VuforiaARController.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted) method) and then disabling VuforiaBehaviour.Instance later results in the "Could not deactivate dataset" error.

I'm trying to measure a different angle right now though: creating all the objects manually in the editor hierarchy, and simply assigning which ones will be used and disabling (not destroying) the others at runtime.

Play mode is running via webcam.

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

June 26, 2020 - 3:14am #2

Hi,

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

Also would it be possible to elaborate on what you are trying to achieve, I am confused on the loading of the dataset at the end. My current understanding is that during the game you need only 5 Objects and at the end you require all the 15. In order to this you have have 2 datasets. One, containing 5 and the second containing 15. You wish to toggle between this datasets? is this correct?

Thank you.

Vuforia Engine Support

Edit: Could you please also confirm if you are using Play Mode -> Webcam or simulation?

Log in or register to post comments