Log in or register to post comments

Best practices for large device databases

October 20, 2016 - 4:05am #1

Hello, 

 

So I have problems with my iOS app with video prefabs being overloading and showing X-marks on some of my trackables (ImageTargets) instead of the videos. Some of the videos work though. If I try and rebuild the trackables (ImageTargets) which displays the X they start working, but instead some other, what seem random trackable stops working in its stead.

 

I believed this to be due to memory problems in the device itself. So I have been hunting for a way of perhaps load in videos only when they are needed - with little to no success. Then I found this script in the documentation:

 

// Load and activate a data set at the given path.

private bool LoadDataSet(string dataSetPath, DataSet.StorageType storageType)

{

    // Check if the data set exists at the given path.

    if (!DataSet.Exists(dataSetPath, storageType))

    {

        Debug.LogError("Data set " + dataSetPath + " does not exist.");

        return false;

    }

  

    // Request an ImageTracker instance from the TrackerManager.

    <span style="color: rgb(51, 51, 51); font-family: monospace;">ObjectTracker</span> objectTracker =

        (<span style="color: rgb(51, 51, 51); font-family: monospace;">ObjectTracker</span>)TrackerManager.Instance.GetTracker<<span style="color: rgb(51, 51, 51); font-family: monospace;">ObjectTracker</span>();

  

    // Create a new empty data set.

    DataSet dataSet = objectTracker.CreateDataSet();

  

    // Load the data set from the given path.

    if (!dataSet.Load(dataSetPath, storageType))

    {

        Debug.LogError("Failed to load data set " + dataSetPath + ".");

        return false;

    }

  

    // (Optional) Activate the data set.

    imageTracker.ActivateDataSet(dataSet);

         

    return true;

}

 

This made all my trackables (ImageTargets) in the scene go empty. Also I keep getting "parsing error". This bit: <span style="color: rgb(51, 51, 51); font-family: monospace;"> doesn't seem to have any class or anything. I want to get this running so I can ship my app as my client are waiting.

 

Any tips or tricks would be lovely! I am having 25 ImageTargets with video prefab and videos on about 30 - 40 seconds each. I am building this in Unity 5.4 and vuforia 6. The app will be used in an old house without wifi, so an device database is needed!

 

Kind Regards

Log in or register to post comments