This problem is happening while I am still running from Editor.
Using Vuforia 7 with Unity 2017.3.0p4
The dataset is loaded. A ObjectTargetBehavior is created but the fields Database and ObjectTarget are EMPTY. And obviously it won't detect anything.
The objective is to download the dataset from an external server and dinamically load it. It will be a mobile application made with unity.
I followed the tutorial to load a dataset at runtime but so far this is the result.
I am using the following code to load the dataset at runtime:
[code]
void Update() {
if (VuforiaRuntimeUtilities.IsVuforiaEnabled() && !mLoaded) {
string externalPath = Application.streamingAssetsPath + "/OficinaPackage/Datasets/MSI_H87M-G43_OT.xml";
if (mDataset == null) { // First, create the dataset ObjectTracker tracker = TrackerManager.Instance.GetTracker<ObjectTracker>(); mDataset = tracker.CreateDataSet(); }
if (mDataset.Load(externalPath, VuforiaUnity.StorageType.STORAGE_ABSOLUTE)) { mLoaded = true; } else { Debug.LogError("Failed to load dataset!"); }
} }
[/code]
Hello CeciLisCosta,
Hello CeciLisCosta,
Are you activating the dataset at any point?
Thanks,
Vuforia Support
Yes.
Yes.
Sorry, the code I past before was another test. This is what I am actually using.
the lines "dataset activated" and "tracker started" are printed. So I supose it is being loaded, activated and started properly.
[code]
Just to make it clear. I do
Just to make it clear. I do not have the dataset imported to my aplication. I only put the .dat and .xml in a external directory. In the final application I will need to download the dataset and load it dinamically.