Log in or register to post comments

Vuforia 5.0.5 with OBB file crash

September 21, 2015 - 7:34am #1

I am using Unity 5.2.0f3 with Vuforia 5.0.5 and getting a strange crash.

I developed a simple AR app for android using OBB, everytime I load the scene the application crash,but if I publish the same app without splitting the file, everything works fine. I created the function to extract the dat and xml files and also setted the write access to external drive as per the article here: https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps

Any insight in what I may doing wrong?

If can be of help I have attached the log of the crash

 

 

 

Vuforia 5.0.5 with OBB file crash

October 7, 2015 - 3:29am #4

I solved the problem.

The problem was that it my function was not in a CoRoutine. The vuforia is not clear about that.

In ther end the correct one (or the least the one that works for me) is as follow:

protected void Start()
    {

      if (Application.platform == RuntimePlatform.Android)
        StartCoroutine(ExtractObbDatasets());
    }

    private IEnumerator ExtractObbDatasets()
    {
      string[] filesInOBB = { "DeAgostini_CorpoUmano.dat", "DeAgostini_CorpoUmano.xml" };
      foreach (var filename in filesInOBB)
      {
        var uri = Application.streamingAssetsPath + "/QCAR/" + filename;
        var outputFilePath = Application.persistentDataPath + "/QCAR/" + filename;
        if (!Directory.Exists(Path.GetDirectoryName(outputFilePath)))
          Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath));
        Debug.Log("Starting to download:  " + uri);
        using (var www = new WWW(uri))
        {
          yield return www;
          if (www.isDone && string.IsNullOrEmpty(www.error))
          {
            File.WriteAllBytes(outputFilePath, www.bytes);
            Debug.Log("Download complete");
          }
          else
            Debug.Log("Error while downloading: " + www.error);
        }
      }
    }
 

Vuforia 5.0.5 with OBB file crash

September 30, 2015 - 6:01am #3

I tried and I get the same result, the camera do not works.

 

Vuforia 5.0.5 with OBB file crash

September 23, 2015 - 5:46pm #2

You might try testing the ImageTargets 5.0.5 sample app with OBB and see if it works on your device.

Log in or register to post comments