Log in or register to post comments

Dynamically Loading and Activating Datasets

March 5, 2018 - 2:41pm #1

Hello all,

With the launch of Model Targets and its restriction of only a single Model Target dataset being activated at a time, we have seen an increase in the number of questions related to loading and activating datasets programmatically.

I've attached a script to this post that provides two examples for doing this. One function within this script will de-activate all currently active datasets in your project and then activate the dataset given in the function's signature. The second function will directly load and activate a single dataset without de-activating any others. The script contains additional information about the process via in-line comments.

Please note that the file is attached as a .txt. You'll need to change the extension to .cs in order for it to work within your project.

Also note that the provided script is only meant as an example and not a comprehensive guide. For additional information on loading and activating datasets, please refer to the library and api documentation.


Vuforia Support

Plain text icon LoadDataset.txt2.72 KB

Dynamically Loading and Activating Datasets

May 31, 2018 - 12:21am #3

This helped me as even with having only one model target (and no other targets, not event the mars sample even present in the unity project) nothing got activated (licence, latest tools, everything checked). 

Only activating on load with your script helped :/.

Dynamically Loading and Activating Datasets

April 6, 2018 - 7:56am #2

Thanks so much! :D

Log in or register to post comments