Log in or register to post comments

Dataset does not exist error when using Unity 4 Android Splitter

December 21, 2012 - 2:05am #1

After splitting my application into apk and obb files, the error "Dataset does not exist" start popping up.

In Unity3D the dataset is kept in the Streaming Assets

Dataset does not exist error when using Unity 4 Android Splitter

February 10, 2016 - 8:41am #128

My videos are working when I copy them to the persistentDataPath but this is making my app even bigger than what needs to be.

My videos are almost 200mb and after the first run of the app there will be 200mb on the persistentDataPath and 200mb on the obb file.

Is there a way to delete the obb file or to move instead of copying the files?

 

Thanks to everyone who contributed to this thread.

Dataset does not exist error when using Unity 4 Android Splitter

January 12, 2016 - 7:22am #127

Dataset does not exist error when using Unity 4 Android Splitter (FIXED!)

Hi to all... 

After several weeks dealing with this "vuforia + unity + split aplication" issue i reach this post written by jon-martin wich give the explanation and a C# script that allow not only execute the agumented scene correctly, but also solve the same problem when u need to play videos. Basicly u have to create a new scene with a camera an a empty game object with the c# script attached. The script extract the datasets .xml and .dat to the persistent directory, and once loaded, go to the agumented scene without any troubbles. Here is the script: DONT FORGET VISIT THE POST TO GET THE FULLY EXPLANATION!!!!

using UnityEngine;
using System.Collections;
using System.IO;

public class AndroidSplitLoadFirstScene: MonoBehaviour {

		//Only use in Preloader Scene for android split APK
		private string nextScene = "YourSceneName";

		public Texture2D background;
		public GUISkin mySkin;
		private bool obbisok=false;

		void Update() {
			if (Application.dataPath.Contains(".obb")&&!obbisok) {
				obbisok=true;
				Application.LoadLevel(nextScene);
			 	// If you need to unpack anything could do it here
			 	// StartCoroutine(CheckSetUp());
			}
		}

		void OnGUI()
		{
			GUI.skin = mySkin;
			GUILayout.BeginArea(new Rect(0,0,Screen.width,Screen.height));
				GUILayout.BeginHorizontal();
				GUILayout.FlexibleSpace();
					GUILayout.BeginVertical();
					GUILayout.FlexibleSpace();
						GUILayout.BeginHorizontal();
							GUILayout.FlexibleSpace();
							GUILayout.Label(background,GUILayout.Width(background.width),GUILayout.Height(background.height));
							GUILayout.FlexibleSpace();
						GUILayout.EndHorizontal();
						if (!obbisok) {	
							GUILayout.BeginHorizontal();
								GUILayout.FlexibleSpace();
									GUILayout.Label("There is an installation error with this application, Please re-install!");
								GUILayout.FlexibleSpace();
							GUILayout.EndHorizontal();
						}
					GUILayout.FlexibleSpace();
					GUILayout.EndVertical();
				GUILayout.FlexibleSpace();
				GUILayout.EndHorizontal();
			GUILayout.EndArea();
		}

}

 

 

i hope this save someone project like my own.

 

Sorry about my english...

Bye all

 

Dataset does not exist error when using Unity 4 Android Splitter

November 4, 2015 - 6:07am #126

As the files are corectly copied from the obb to device storage as I can see in ES Explorer I have now tried changing VideoPLaybackBehaviour as follows to amend m_path which when I check the console the path created when on Anroid exactly matches where the file is on the device?

 

 

 

	void Awake() {

		#if UNITY_ANDROID

			AndroidJavaClass jclassEnvironment = new AndroidJavaClass("android.os.Environment");
			AndroidJavaObject jobjFile = jclassEnvironment.CallStatic<AndroidJavaObject>("getExternalStorageDirectory");
			string externalStorageDirectory = jobjFile.Call<string>("getAbsolutePath");
		
			AndroidJavaObject jobjActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
			string packageName = jobjActivity.Call<string>("getPackageName");
		
			m_androidPath = externalStorageDirectory + "/Android/data/" + packageName + "/files/" + m_path;

			Debug.Log(m_androidPath);

		#endif
	}

 

and in Start()

 

	#if UNITY_ANDROID

		     mVideoPlayer.SetFilename(m_androidPath);
	
		#else

			mVideoPlayer.SetFilename(m_path);

		#endif

But still the videos do not play as when in single apk.  All I get is the X on the video object.

 

I have also tried appending file::/ to the path but still nothing.

Dataset does not exist error when using Unity 4 Android Splitter

November 4, 2015 - 6:06am #125

As the files are corectly copied from the obb to device storage as I can see in ES Explorer I have now tried changing VideoPLaybackBehaviour as follows to amend m_path which when I check the console the path created when on Anroid exactly matches where the file is on the device?

 

 

 

	void Awake() {

		#if UNITY_ANDROID

			AndroidJavaClass jclassEnvironment = new AndroidJavaClass("android.os.Environment");
			AndroidJavaObject jobjFile = jclassEnvironment.CallStatic<AndroidJavaObject>("getExternalStorageDirectory");
			string externalStorageDirectory = jobjFile.Call<string>("getAbsolutePath");
		
			AndroidJavaObject jobjActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
			string packageName = jobjActivity.Call<string>("getPackageName");
		
			m_androidPath = externalStorageDirectory + "/Android/data/" + packageName + "/files/" + m_path;

			Debug.Log(m_androidPath);

		#endif
	}

 

and in Start()

 

	#if UNITY_ANDROID

		     mVideoPlayer.SetFilename(m_androidPath);
	
		#else

			mVideoPlayer.SetFilename(m_path);

		#endif

But still the videos do not play as when in single apk.  All I get is the X on the video object.

 

I have also tried appending file::/ to the path but still nothing.

Dataset does not exist error when using Unity 4 Android Splitter

November 4, 2015 - 5:31am #124

getting close but do not know what the issue is?

Doing this when running via split binary on Samsung Galaxy S6 I see the full path /storage/emulated/0/Android/data/com.MyApp/files/dillion.m4v is used

 

#if UNITY_ANDROID

			AndroidJavaClass jclassEnvironment = new AndroidJavaClass("android.os.Environment");
			AndroidJavaObject jobjFile = jclassEnvironment.CallStatic<AndroidJavaObject>("getExternalStorageDirectory");
			string externalStorageDirectory = jobjFile.Call<string>("getAbsolutePath");

			//mVideoPlayer.SetFilename(externalStorageDirectory + "/Android/data/" + packageName + "/files/" + m_path);

			mVideoPlayer.SetFilename("/storage/emulated/0/Android/data/com.MyApp/files/dillion.m4v");

		#else

			mVideoPlayer.SetFilename(m_path);

		#endif

But then further down the console output I get this:

 

V/MediaPlayer-JNI﹕ native_setup
11-04 13:18:50.741  31716-31734/? V/MediaPlayer﹕ constructor
11-04 13:18:50.741  31716-31734/? V/MediaPlayer﹕ setListener
11-04 13:18:50.741  31716-31734/? D/VuforiaMedia﹕ Could not create a Media Player
11-04 13:18:50.761   2989-32126/? D/ShotSingle﹕ CAMERA_MSG_PREVIEW_FRAME E
11-04 13:18:50.761    3507-4120/? I/EDMNativeHelperService﹕ isCameraEnabled
11-04 13:18:50.761   2989-32126/? D/ShotSingle﹕ CAMERA_MSG_PREVIEW_FRAME X
11-04 13:18:50.761  31716-31734/? I/Unity﹕ Could not load video 'dillion.m4v' for media type ON_TEXTURE_FULLSCREEN

 

The videos are on a 3D object and as stated before work perfect in single APK and on IOS it is this split binary that is causing all the headache :-(

Dataset does not exist error when using Unity 4 Android Splitter

November 4, 2015 - 3:49am #123

Made a lot of progress but one MAJOR issue remains!

We now have the files being copied from th obb into storage/emulated/0//Android/data/<pakage_name>/files/ and when checking this folder QCAR folder is present and has the dat and xml files.  

The files folder also contains all our movies and from explorer tool these play corectly.

But in the app the AR triggers but the videos have the X icon and videos will not load.  So it still looks like the videos cannot be found by Vuforia...but the dat and xml can?

in my Unity project the folder structure is:

StreamingAssets

  video file

  video file 

  video file

  QCAR

      dat file

     xml file

This layout works fro IOS and Android when Android is a single apk.

 

 

Dataset does not exist error when using Unity 4 Android Splitter

November 3, 2015 - 11:25am #122

 

@aman001 

see my comments here as I implemented what you recommend and it does not work?

https://developer.vuforia.com/forum/issues-and-bugs/split-binary-unable-find-extended-root-locations#comment-2059795

Dataset does not exist error when using Unity 4 Android Splitter

June 10, 2015 - 6:47am #121

Hi,

I can't override this function, beacause it's not available.

Seems like my Vuforia version is too old.

Any idea how to solve this?

Dataset does not exist error when using Unity 4 Android Splitter

February 24, 2015 - 3:17am #120

I have Solved this problem.

Just  follow exactly all those steps including the DAT/XML given in link below.

https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps

than, just Open your DataSetLoadBehaviour.cs File

 

Add the Following lines of code in that file :

void Awake() {		
  AddOSSpecificExternalDatasetSearchDirs ();
}

What i found is that Vuforia SDK was not searching for ExternalDatabaseDirs, because this function ( AddOSSpecificExternalDatasetSearchDirs ) was not getting call from anywhere. 

Hope it resolves your problem.

Dataset does not exist error when using Unity 4 Android Splitter

January 9, 2015 - 3:22am #119

I use this code placed on a gameobject in an empty first scene, it seems to solve my problems at least vuforia 3 or up

you can check my post on it here

 

Code is below c#:

using UnityEngine;
using System.Collections;
using System.IO;

public class AndroidSplitLoadFirstScene: MonoBehaviour {

	//Only use in Preloader Scene for android split APK
	private string nextScene = "YourMainFirstSceneName";

	public Texture2D background;
	public GUISkin mySkin;
	private bool obbisok=false;
	private bool loading=false;
	private bool replacefiles=false; //true if you wish to over copy each time
	
	private string[] paths={	
								"QCAR/yourtargets.dat",
								"QCAR/yourtargets.xml",
								"QCAR/Unity.txt",
								"mymovie1.m4v",
								"mymovie2.m4v"
							};

	void Update() {
		if (Application.platform==RuntimePlatform.Android)	{
			if (Application.dataPath.Contains(".obb")&&!obbisok) {
				StartCoroutine(CheckSetUp());
				obbisok=true;
			}
		} else {
			if (!loading) {
				StartApp();
			}
		}
	}

	void OnGUI()
	{
		GUI.skin = mySkin;
		GUILayout.BeginArea(new Rect(0,0,Screen.width,Screen.height));
			GUILayout.BeginHorizontal();
			GUILayout.FlexibleSpace();
				GUILayout.BeginVertical();
				GUILayout.FlexibleSpace();
					GUILayout.BeginHorizontal();
						GUILayout.FlexibleSpace();
						GUILayout.Label(background,GUILayout.Width(background.width),GUILayout.Height(background.height));
						GUILayout.FlexibleSpace();
					GUILayout.EndHorizontal();
					if (!obbisok) {	
						GUILayout.BeginHorizontal();
							GUILayout.FlexibleSpace();
								GUILayout.Label("There is an installation error with this application, Please re-install!");
							GUILayout.FlexibleSpace();
						GUILayout.EndHorizontal();
					}
				GUILayout.FlexibleSpace();
				GUILayout.EndVertical();
			GUILayout.FlexibleSpace();
			GUILayout.EndHorizontal();
		GUILayout.EndArea();
	}
	
	public void StartApp() {
		loading=true;
		Application.LoadLevel(nextScene);
	}
	
	public IEnumerator CheckSetUp() {
		//Check and install!
		for(int i=0;i<paths.Length;++i) {
			yield return StartCoroutine(PullStreamingAssetFromObb(paths[i]));
		}
		yield return new WaitForSeconds(1f); 
		StartApp();
	}
	
	//Alternatively with movie files these could be extracted on demand and destroyed or written over
	//saving device storage space, but creating a small wait time.
	public IEnumerator PullStreamingAssetFromObb(string sapath) { 
		if (!File.Exists(Application.persistentDataPath+sapath)||replacefiles) {
			WWW unpackerWWW = new WWW(Application.streamingAssetsPath + "/" + sapath);
			while (!unpackerWWW.isDone) {
				yield return null;
			}
			if (!string.IsNullOrEmpty(unpackerWWW.error)) {
				dpack="Error unpacking:" + unpackerWWW.error+" path: "+unpackerWWW.url;
				Debug.Log(dpack);
				yield break; //skip it
			} else {
				dpack="Extracting "+sapath+" to Persistant Data";
				Debug.Log (dpack);
				if(!Directory.Exists(Path.GetDirectoryName(Application.persistentDataPath+"/"+sapath))) {
					Directory.CreateDirectory(Path.GetDirectoryName(Application.persistentDataPath+"/"+sapath));
				}
				File.WriteAllBytes(Application.persistentDataPath+"/"+sapath,unpackerWWW.bytes);
				//could add to some kind of uninstall list?
			}
		}
		yield return 0;
	}
}

 

Dataset does not exist error when using Unity 4 Android Splitter

January 8, 2015 - 11:59pm #118

Hi,

in case you use the code snippet in this thread:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/cant-load-dataset-obb-vuforia-3

one thing you can try is to delay a bit the call to the Application.LoadLevel(), i.e. instead of calling it immediately after the return statement (in the ExtractOBBDatasets method), you may want to call it from the Update() method after setting a boolean flag to true (something like: bool datasetsWereExtractedAndSaved), or even wait a few frames (using a frame counter) so to interpone some time between the file saving operation and the start of the new scene;

my hypotheis here is that the file saving operation might complete with a small delay at the OS level and when loading the new scene, Vuforia may try to load some files that are either non existing or in incomplete state.

 

Dataset does not exist error when using Unity 4 Android Splitter

December 19, 2014 - 6:50pm #117

I have the same issue. My app crash before it gets to load the AR scene.

Crashes on android lolipop and down.

commandline: adb logcat  , spits out:

 

D/QCAR    ( 4082): imageTrackerCreateDataSet
I/AR      ( 4082): ImageTracker: Successfully created dataset
D/QCAR    ( 4082): Successfully created data set.
D/dalvikvm( 4082): Trying to load lib /data/app-lib/com.test.app-1/libQCARWrapper.so 0x4195b490
D/dalvikvm( 4082): Shared lib '/data/app-lib/com.test.app-1/libQCARWrapper.so' already loaded in same CL 0x4195b490
D/QCAR    ( 4082): dataSetLoad
I/WindowState(  524): WIN DEATH: Window{41ff5de0 u0 SurfaceView}
I/ActivityManager(  524): Process com.test.app (pid 4082) has died.
 
 
Desperately need help!

Dataset does not exist error when using Unity 4 Android Splitter

December 2, 2014 - 2:07am #116

someone else??

Dataset does not exist error when using Unity 4 Android Splitter

November 25, 2014 - 7:34am #115
hello  hollym ,
I have the same problem.
you managed to solve the problem of crash ??

Dataset does not exist error when using Unity 4 Android Splitter

October 3, 2014 - 6:23am #114

Can't anyone help?

I've followed the steps here; the code is the exact same and I've made sure everything is activated that should be:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/cant-load-dataset-obb-vuforia-3

Using this, the .dat and .xml are save to the persisent data path but the app crashes before it gets to the Augmented Reality scene.

I'm at my wits end with this...

Dataset does not exist error when using Unity 4 Android Splitter

October 2, 2014 - 8:22am #113

Yes I've done all that.

I tried printing the persistent data path when I Build and Run to my tablet and it shows me where the files are saved. I followed this path and only the .dat file is saved in the path; not the .xml.

The .dat file is the first in the string, so maybe its only registering that and missing the second?

I tried seperating the files so they arent in a string, theyre identified and sorted seperately. However, it still comes up in the Console as only saving the first file (in the following script it's the .xml):

using UnityEngine;
using System.Collections;
using System.IO;
 
public class ObbExtractor2 : MonoBehaviour {
 
    void Start () {
        StartCoroutine(ExtractObbDatasets());
    }
    private IEnumerator ExtractObbDatasets () {
            string XMLuri = "file://" + Application.streamingAssetsPath + "/QCAR/" + "Tracker_Name.xml";
            string XMLoutputFilePath = Application.persistentDataPath + "/QCAR/" + "Tracker_Name.xml";
            if(!Directory.Exists(Path.GetDirectoryName(XMLoutputFilePath)))
                Directory.CreateDirectory(Path.GetDirectoryName(XMLoutputFilePath));
 
        string DATuri = "file://" + Application.streamingAssetsPath + "/QCAR/" + "Tracker_Name.dat";
        string DAToutputFilePath = Application.persistentDataPath + "/QCAR/" + "Tracker_Name.dat";
        if(!Directory.Exists(Path.GetDirectoryName(DAToutputFilePath)))
            Directory.CreateDirectory(Path.GetDirectoryName(DAToutputFilePath));
 
        var XMLwww = new WWW(XMLuri);
        yield return XMLwww;
        Save(XMLwww, XMLoutputFilePath);
        yield return new WaitForEndOfFrame();
 
        var DATwww = new WWW(DATuri);
        yield return DATwww;
        Save(DATwww, DAToutputFilePath);
        yield return new WaitForEndOfFrame();   
        }
        // When done extracting the datasets, Start Vuforia AR scene
 
    private void Save(WWW www, string outputPath) {
        File.WriteAllBytes(outputPath, www.bytes);
 
        // Verify that the File has been actually stored
        if(File.Exists(outputPath))
            Debug.LogError("File successfully saved at: " + outputPath);
        else
            Debug.LogError("Failure!! - File does not exist at: " + outputPath);
 
        Application.LoadLevel("SceneMenu1");
    }
}

Why is it only saving the one?

SOME INTERESTING BITS: 

In the original OBB Extractor script that has the string:

  • If I put Application.LoadLevel at the end of the script (like above) it pushes through to the ARScene, nothing augments and only the first file in the string (in this case the .dat file) is saved to the persistent data path.
  • If I put Application.LoadLevel after yield return new WaitForEndOfFrame(); but before private void Save(WWW www, string outputPath){, it crashes at the 'Loader' scene but both the .dat and .xml files are saved in the persistent data path.
  • If I put Application.LoadLevel in void Update(){, it pushes through to the ARScene, nothing augments, and no files are saved to the persistent data path.

Dataset does not exist error when using Unity 4 Android Splitter

October 1, 2014 - 9:11am #112

Have you done the following?:

  • make sure that the 'Load Data Set Your_Dataset_Name' and 'Activate Data Set Your_Dataset_Name' check-boxes are enabled (ticked) in the ARCamera inspector (under the Data Set Load Behaviourcomponent)
  • in the Player Settings (for Android), set the Write Access property to 'External (SD card)'
  • in the Player Settings,enabled the Split Application Binary option 

 

Dataset does not exist error when using Unity 4 Android Splitter

October 1, 2014 - 7:18am #111

Just to update: I tried reimporting the Vuforia package, and merging the android manifest again. I retested, and still nothing.

What could I be missing?

When I Build and Run directly onto my tablet, it still doesnt augment. So maybe it's not to do with the Google Developer Consoles process?

Dataset does not exist error when using Unity 4 Android Splitter

September 30, 2014 - 7:42am #110

Yes, I thought it might be the case that these were obsolete; I just wanted to check.

In regards to your clarification, what you said is exactly what I've done, therefore in theory, it should work...but it doesn't.

I'm really confused about this, there must be some sort of stupid mistake I'm making or something I'm missing!

EDIT: I've just noticed there are two errors on the ARCamera:

Exception occurred when trying to parse web cam profile file: a name did not start with a legal character 60 (<) file:///Users/user/Documents/CLIENTS/CompanyName/ARAR/Unity 4.5.4f1/stuff/Assets/Plugins/Android/AndroidManifest.xml Line 5, position 1.
UnityEngine.Debug:LogError(Object)
AndroidManifestOrientationSetter:SetOrientationInAndroidManifest(String)
AndroidManifestOrientationSetter:CheckAndApplyOrientationSettings()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
 
The selected orientation could not be set for the Vuforia activities in Plugins/Android/AndroidManifest.xml
Make sure to set the required orientation manually.
UnityEngine.Debug:LogError(Object)
AndroidManifestOrientationSetter:SetOrientationInAndroidManifest(String)
AndroidManifestOrientationSetter:CheckAndApplyOrientationSettings()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
 
 

This occurs whatever I change the orientation of the camera to in Player Settings. Could this be the cause of the problem or is this just something that occurs in the Editor?

I am using the built-in webcam on my Mac

And this is my Android Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.qualcomm.QCARUnityPlayer" android:versionCode="10" android:versionName="1.0">
  <uses-sdk android:minSdkVersion="8" />
  <uses-feature android:name="android.hardware.camera" />
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:debuggable="false">
    <activity android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      <meta-data android:name="android.app.lib_name" android:value="unity" />
      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:screenOrientation="landscape" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
  </application>
  <uses-permission android:name="com.android.vending.CHECK_LICENSE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
<!-- android:installLocation="preferExternal" -->

I noticed theres a dupliate bit at the top:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"

So I tried deleting it and retesting but it has not effect (it did clear the errors though)

Dataset does not exist error when using Unity 4 Android Splitter

September 29, 2014 - 11:32am #109

The LoadAndAugment script you posted below comes from an old / unrelated thread. Maybe that was applicable to older version of Vuforia.

Wih Vuforia 3.0.9, you don't need to add any of those special scripts to load / augment dynamically (unless you explicitly want to do so, i.e. programmatically loading, etc.).

Let me clarify a bit:

if you have a bunch of Image Targets defined in your Unity Scene in the Unity Editor, and you have an ARCamera in which you have enabled the checkboxes for  "Load Data Set MyDataset " and "Activate DataSet My Dataset" under the Data Set Load Behaviour component of the ARCamera,

then all you need is the ObbExtrator script that extracts the Datasets from Streaming Assets and save them into the Application.persistentDataPath + "/QCAR" (which is the script you were already using);  the only additional bit is to enable the Split Binary option.

 

The use of additional scripts e.g. to Load and augment datasets programmatically is only needed if you are not defining the Image Targets in the scene (via the Editor) and you want to load and create / augment targets on the fly (programmatically).  

Note that if you attempt to mix the 2 approaches you can incur in issues; for example, if you have a Dataset and you have Loaded and Activated it in the Data Set Load Behaviour under your ARCamera (i.e. via the Unity Editor inspector), and then you also try to Load and Activate the same dataset programmatically via a script, this may result in an error condition (as basically you're trying to load the same Dataset twice...).  So, this is something to avoid.

See also:

https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps

 

 

 

 

Dataset does not exist error when using Unity 4 Android Splitter

September 29, 2014 - 8:50am #108

Yes, that's what I've got so far but with no luck. If there is some sort of incompatibilty with the Google OBB Dowloader and Vuforia dataset extraction I have no ideas left of how to fix it. 

Have you been successful with using obb and vuforia?

EDIT: I was just looking back at the previous posts on this thread and people are talking about changing the Vuforia scripts (which I think is risky). Just to be clear, this isnt necessary is it?

I also tried the script you posted Alessandro which you said should:

  • load a dataset
  • augment each trackable
  • add a DefaultTrackableEventHandler to each trackable of the loaded dataset
public class LoadAndAugment : MonoBehaviour {
 
    private bool mDataSetLoaded = false;
    private bool mLoadError = false;
     
    // Update is called once per frame
    void Update () {
        if (!mDataSetLoaded && !mLoadError) {
            // Out dataset not loaded yet,
            // let's load it 
 
            // first get the ImageTarcker
            ImageTracker it = TrackerManager.Instance.GetTracker<ImageTracker>();
             
            // Load dataset from file
            DataSet dataSet = it.CreateDataSet();
 
            if (dataSet.Load ("QCAR/Tarmac.xml", DataSet.StorageType.STORAGE_APPRESOURCE)) {
                mDataSetLoaded = true;
            } else {
                Debug.LogError ("Failed to load dataset");
                mLoadError = true;
                return;
            }
             
            // Dataset has been loaded
            // Activate the dataset
            it.ActivateDataSet(dataSet);
             
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable<TrackableBehaviour> tbs = sm.GetTrackableBehaviours();
             
            // Add an augmentation to each trackable
            foreach ( TrackableBehaviour tb in tbs ) {
                Debug.Log ("Adding augmentation to " + tb.TrackableName);
 
                // Create a simple cube
                GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
                 
                // attach the cube to the TB
                cube.transform.parent = tb.transform;
                 
                // adjust the local position and scale
                cube.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
                cube.transform.localPosition = new Vector3(0,0.15f,0);
                cube.transform.localRotation = Quaternion.identity;
                cube.SetActive(true);
                 
                // Add a DefaultTrackableEventHandler to the Trackable object
                tb.gameObject.AddComponent<DefaultTrackableEventHandler>();
            }
        }
    }
}

Which, in the Hierarchy in the Editor, shows two cubes as children of the Image Target but in the camera view, shows nothing. I've tried editing the position/scale in case this was the issue, but to no avail.

Dataset does not exist error when using Unity 4 Android Splitter

September 29, 2014 - 3:23am #107

In my experience you should not  need to integrate the Google OBB Download library; just use the ObbExtractor script to extract the dataset files from the StreamingAssets path and save them to the Application.persistentDataPath / QCAR / ...

That alone should be sufficient; then, once the ObbExtractor has completed its job,  simply load the AR Vuforia scene and let Vuforia automatically find the datasets from the previous path .

Maybe the issue with the StreamingAssets path is because of the use of the Google Obb Download library ?

 

 

Dataset does not exist error when using Unity 4 Android Splitter

September 29, 2014 - 2:57am #106

Unfortunately, switching to Advanced Mode had no effect whatsoever. I was able to unload the obb package anyway so I wasnt too confident about it working.

I've had a couple more thoughts though.

First of which is about the code which extracts the dataset: I've currently got that in an empty scene that pushes through to the ARScene, would the script perhaps be more effective if it was in the same script as the one that downloads the obb? (i.e. it dowloads the obb and immediately extracts the dataset)

Secondly, I am using the Google OBB Dowloader, found on the Asset Store here: http://u3d.as/content/unity-technologies/google-play-obb-downloader/2Qq

Is this completely compatible with the newest versions of Unity/Vuforia?

Has anyone else been having these problems?

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 8:09am #105

Hmm, this is strange. I primarily use Unity forums/answers for any queries I have, but when I started posting about this, no one seemed to reply. Thats why I tried the Vuforia forums as I thought I could find something more specifically relating to the issue; I've found that on Unity forums, they tend to shy away from AR-related questions, unfortunately.

A couple of things:

  • When I download the .APK via the Google Developer Console, it automatically downloads the .OBB at the same time (No need to press the "Start Download" button when the app starts)
  • When I send the .APK (not the obb) via Bluetooth to the device, it comes up with the button to download the .OBB but when clicked, it does nothing.
  • When I send both the .APK and the .OBB to the device via Bluetooth (putting the .OBB on the "Android>obb" file path) it does the same thing as just sending the .APK.
  • When I build and Run directly onto the device it loads everything but nothing augments in the AR scene (This previously worked, not sure why it doesnt now)

I've just uploaded a new version of the app the the Advanced Mode part of Alpha Testing so we shall see if that works

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 7:34am #104

Also, this thread suggests that the OBB file should be uploaded manually, after selecting "Advanced Mode" in the Google Play Developer Console:

http://support.twixlmedia.com/discussions/rovingbird-epublisher-builder/718-google-play-new-developer-console-how-to-upload-apk-obb

perhaps this is the issue ?

 

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 7:26am #103

The script below simply extracts the files from the StreamingAssets locationa and saves them to the outputPath.

Vuforia should then automatically pick them from the location at "outputPath", provided that the outputPath location is:

Application.persistentDataPath + "/QCAR/"

(and you don't need to do anything else about that, except enabling the "Binary Split" option in the build settings).

 

But the fact that AssetBundles also do not work seems to suggest there is some sort of incompatibility between the path handling in Unity and the Google Console...

Have you also tried searching in the Unity forum ? 

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 6:57am #102

I've ran out of ideas now!

It doesnt make a difference whether I put jar: infront of file:// or not.

AssetBundles don't seem to work.

The script I used to extract the .dat and .xml files, does this just extract the files or does it implement them? If it's just extracting them, do I need to implement them or should the tracker related scripts do that automatically?

Extraction script:

using UnityEngine;
using System.Collections;
using System.IO;

public class ObbExtractor : MonoBehaviour {
	
	void Start () {
		StartCoroutine(ExtractObbDatasets());
	}
	private IEnumerator ExtractObbDatasets () {
		string[] filesInOBB = {"Tracker_Name.dat", "Tracker_Name.xml"};
		foreach (var filename in filesInOBB) {
			string uri = "file://" + Application.streamingAssetsPath + "/QCAR/" + filename;
			
			string outputFilePath = Application.persistentDataPath + "/QCAR/" + filename;
			if(!Directory.Exists(Path.GetDirectoryName(outputFilePath)))
				Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath));
			
			var www = new WWW(uri);
			yield return www;
			
			Save(www, outputFilePath);
			yield return new WaitForEndOfFrame();
		}
		// When done extracting the datasets, Start Vuforia AR scene
	}
	private void Save(WWW www, string outputPath) {
		File.WriteAllBytes(outputPath, www.bytes);
		
		// Verify that the File has been actually stored
		if(File.Exists(outputPath))
			Debug.Log("File successfully saved at: " + outputPath);
		else
			Debug.Log("Failure!! - File does not exist at: " + outputPath);
		
		Application.LoadLevel("SceneMenu1");
	}
}

 

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 5:37am #101

If both files are located in your /Assets/StreamingAssets/QCAR/ folder under your Unity project root directory,

then I don't see any obvious reason why the XML would not be in the file system... 

 

 

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 5:24am #100

Thus far I have only tested it with "file://" and it hasnt worked, so I'll give it a go with "jar:file://".

I tried with AssetBundles to see if it was the augmenting that was a problem but that didnt work either. I think it could be more to do with the extraction of files and how that is read when put through the Google Developer Console.

I also came up with another possible cause, I am using this script to identify the 2 dataset related files:

string[] filesInOBB = {"Tracker_Name.dat", "Tracker_Name.xml"};
		foreach (var filename in filesInOBB) {
			string uri = "File://" + Application.streamingAssetsPath + "/QCAR/" + filename;

But when I look in the file system, only the .dat file is there. Could it be that it is only registering the first file in the string and therefore missing the second?

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 5:04am #99

I'm reading the Unity online manual link you are referring to  ( i.e. http://docs.unity3d.com/Manual/StreamingAssets.html):

it says that on Android you should use the "jar:file://" prefix:

 path = "jar:file://" + Application.dataPath + "!/assets/";

However, the same article also mentions:

It’s always best to use Application.streamingAssetsPath to get the location of the StreamingAssets folder, it will always point to the correct location on the platform where the application is running.

So, theoretically the use of Application.streamingAssetsPath should be the correct way to go.

However I wonder if in fact that could be the cause of the problem when testing on the Google Dev Console; have you tried doing the opposite, i.e. replacing the "jar:file://" with just the "file:" prefix (i.e. removing the "jar:" part) and see if the Google Console likes it better ?

 

Dataset does not exist error when using Unity 4 Android Splitter

September 26, 2014 - 3:54am #98

I have tried prepending it with "file://", like so:

string uri = "File://" + Application.streamingAssetsPath + "/QCAR/" + filename;

When I tested it, it still didnt work. In my file system, there is now a folder called "File/" which, once you get through all the subfolders, has the .dat file, but not the .xml.

I was thinking it could be that its extracting the dataset but not linking up the augmentations. Therefore, I am currently trying to create an AssetBundle with script the augments the bundle to see if that works.

I also saw something interesting that could be a problem, in the link: http://docs.unity3d.com/Manual/StreamingAssets.html

This says, when testing on Android, the prepend "file://" must be "jar:file://", could this be why its not working on my Android tablet?

Thanks for you patience

Dataset does not exist error when using Unity 4 Android Splitter

September 24, 2014 - 1:25pm #97

What I mean is that it could be a problem with the url passed to the WWW class when testing with the Google Console;

if you look at the error message, this is saying:

You are trying to load data from a www stream which had the following error when downloading.
<url> malformed
UnityEngine.WWW:get_bytes()

this means that when the www .bytes (which internally is implemeted by the "WWW:get_bytes"), the URL is not matching the expected format (malformed);

for example, you might just need to prepend a "file://" to the filepath given by the Application.streamingAssetPath or something along that line;

if you print out the value (string) of the URL passed to the WWW in the gogle console, what does it say ?

 

Dataset does not exist error when using Unity 4 Android Splitter

September 24, 2014 - 7:01am #96

Thank you so much for the help Alessandro.

Sorry to be a pain but I don't understand what you mean that it could be more to do with how to handle the Obb Expansion files in the Google Developer Console, rather than Vuforia. I have got OBB files working without any AR so far. Could you explain a bit more what you mean please?

Thank you

Dataset does not exist error when using Unity 4 Android Splitter

September 23, 2014 - 1:34pm #95

I think this has more to do with how to handle the Obb Expansion files in the Google Developer Console,  rather than Vuforia;  if you search the web on this subject, you may find several threads, here is one for instance:

http://stackoverflow.com/questions/14015134/expansion-files-in-the-new-google-play-developer-console

 

Dataset does not exist error when using Unity 4 Android Splitter

September 23, 2014 - 6:18am #94

I've used the following script on the 'Loading Scene":

using UnityEngine;
using System.Collections;
using System.IO;

public class ObbExtractor : MonoBehaviour {
	
	void Start () {
		StartCoroutine(ExtractObbDatasets());
	}
	
	private IEnumerator ExtractObbDatasets () {
		string[] filesInOBB = {"Aspect_Ratio.dat", "Aspect_Ratio.xml"};
		foreach (var filename in filesInOBB) {
			string uri = Application.streamingAssetsPath + "/QCAR/" + filename;
			
			string outputFilePath = Application.persistentDataPath + "/QCAR/" + filename;
			if(!Directory.Exists(Path.GetDirectoryName(outputFilePath)))
				Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath));
			
			var www = new WWW(uri);
			yield return www;
			
			Save(www, outputFilePath);
			yield return new WaitForEndOfFrame();
		}
		
		// When done extracting the datasets, Start Vuforia AR scene
		//Application.LoadLevel("ARScene");
	}
	
	private void Save(WWW www, string outputPath) {
		File.WriteAllBytes(outputPath, www.bytes);
		
		// Verify that the File has been actually stored
		if(File.Exists(outputPath))
			Debug.Log("File successfully saved at: " + outputPath);
		else
			Debug.Log("Failure!! - File does not exist at: " + outputPath);

		Application.LoadLevel("SceneMenu1");
	}
}

Which works absolutely fine when I Build and Run to my device. However, when I put it on the Google Developer Console, it plays the 'Loader Scene" then pushes through to the AR scene where the AR Camera is activated, but it augments nothing.

When I play it in the Editor, it comes up with the error:

You are trying to load data from a www stream which had the following error when downloading.
<url> malformed
UnityEngine.WWW:get_bytes()
ObbExtractor:Save(WWW, String) (at Assets/ObbExtractor.cs:32)
<ExtractObbDatasets>c__Iterator1:MoveNext() (at Assets/ObbExtractor.cs:23)
 
Why is this coming up if it still works in the Editor and as a Build and Run?

Dataset does not exist error when using Unity 4 Android Splitter

September 21, 2014 - 4:16am #93

The script 'ObbExtractor' seems correct;   it loads the dataset files from the StreamingAssets folder and then copies them into the Application.persistentDataPath + "/QCAR" directory.

 

the problem is with the second script (the "Extract" class);   you don't need that script, because Vuforia will automatically load the Datasets from the filepath Application.persistentDataPath + "/QCAR".

Just remove that script and make sure that the Datasets are selected and activated in the ARCamera, under the Data Set Load Behaviour component (see the ARCamera inspector).

 

Dataset does not exist error when using Unity 4 Android Splitter

September 19, 2014 - 6:17am #92

Hi,

I've updated Unity and Vuforia as this was the better option (as opposed to lots of complex coding).

I took a look at these three links:

                https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps

                https://developer.vuforia.com/forum/faq/unity-loading-dataset-sd-card

               https://developer.vuforia.com/forum/android/android-split-issue-unity3d

First I created a scene with a Main Camera and Empty GameObject in it. On the GameObject I put the following script:

using UnityEngine;
using System.Collections;
using System.IO;
 
public class ObbExtractor : MonoBehaviour
{
    private string urlOfDatasetInObb, filePath, directoryPath;
    private IEnumerator loadARComponentsForAPKSplit()
    {
        //if UNITY_ANDROID
        urlOfDatasetInObb = System.String.Empty;
        filePath = directoryPath = System.String.Empty;
        directoryPath = (Application.persistentDataPath + "/QCAR");
        Directory.CreateDirectory (directoryPath);
        yield return null;
 
        urlOfDatasetInObb = (Application.streamingAssetsPath + "/QCAR/TrackerName.xml"); 
        var www = new WWW(urlOfDatasetInObb); 
        yield return www;
        filePath = Path.Combine(directoryPath, "TrackerName.xml");
        File.WriteAllBytes(filePath, www.bytes);
        yield return null;
 
        urlOfDatasetInObb = filePath = System.String.Empty;
        www = null;
 
        urlOfDatasetInObb = (Application.streamingAssetsPath + "/QCAR/TrackerName.dat");
        www = new WWW(urlOfDatasetInObb); 
        yield return www;
        filePath = Path.Combine(directoryPath, "TrackerName.dat");
        File.WriteAllBytes(filePath, www.bytes );
 
        Application.LoadLevel("ARScene");
    }           
    // Can load the level now!
    //endif
    }

Then I created a basic AR scene; tracker and basic model. On the ARCamera, I put the following script:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
 
public class Extract : MonoBehaviour {
 
    private bool mDataSetsLoaded = false;
    private string[] mDataSetNames = new string[] {"TrackerName.xml", "TrackerName.dat"}; //replace with your dataset name
    // Update is called once per frame
    void Update () 
    {
        ImageTracker itracker = TrackerManager.Instance.GetTracker<ImageTracker>(); 
        if (itracker == null) return;
        if (!mDataSetsLoaded) {
            string dataSetRootDir = Application.persistentDataPath + "/QCAR/";
            foreach(var datasetName in mDataSetNames) {
                DataSet dataSet = itracker.CreateDataSet();
                if (dataSet.Load (dataSetRootDir + datasetName, QCARUnity.StorageType.STORAGE_ABSOLUTE))
                    itracker.ActivateDataSet(dataSet);
            }
            mDataSetsLoaded = true;
        }
    }
}

I then made sure the Dataset is selected and activated, the Write Access is set to External(SDCard) and Split Binary is checked. Whether I test it in Play Mode, or Build and Run it onto my Samsung Galaxy Tab, nothing happens.

Does anyone have a clue what I'm missing?

Thanks in advance

Dataset does not exist error when using Unity 4 Android Splitter

September 18, 2014 - 4:12am #91

We don't support Vuforia 2.0 (this is a very old version);

however, you should be able to achieve the same result as described there (https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps),

but you will need to programmatically load the Datasets, i.e. using the DataSet.Load() function n a C# script (i.e. first you extract the files from the OBB and you copy them to the external storage as described in the article,   then, on top of this, you can programmatically load the datasets with a script;   note however, that you will not be able in this case to Load the Image targets from a Dataset via the Data Set Load Behaviour in the AR Camera via the Unity Editor...   you'll have to do everything via scripting, and then attaching the Augmentations to the targets at runtime).

See also:

https://developer.vuforia.com/forum/faq/unity-how-do-i-get-list-active-trackables

https://developer.vuforia.com/forum/faq/unity-loading-dataset-sd-card

 

 

Dataset does not exist error when using Unity 4 Android Splitter

September 18, 2014 - 3:06am #90

Hi there, 

Im using Unity 4.1.3f3 and Vuforia v2.0.32

I see theres a way of extracting datasets to enable content to augment for Vuforia 3.0.9 which looks pretty good. But I was wondering if there was a sound way of doing it with the version I'm running? I plan to update both Unity and Vuforia soon but am reluctant to do so at the moment as I'm in the middle of an important project.

Thanks

Dataset does not exist error when using Unity 4 Android Splitter

July 22, 2014 - 12:43pm #89

Hi,

Vuforia 3.0.9 adds support for easier handling of dataset loading when the OBB split option is used.

You can check the guidelines in this article:

https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps

In particular, with respect to previous SDk versions, with 3.0.9 you are no longer required to programmatically load the Datasets using the Dataset.Load() API (although you can still use that approach if your application requires to do so) and to create targets programmatically at runtime, as Vuforia 3.0.9 can now automatically match the Targets that you have created in your Scene via the Unity Editor with the targets available in the Datasets.

The only requirement at application level is to programmatically extract the Dataset files from the OBB expansion package and store them onto the application persistent datapath, as explained in the article above. This is left to the application logic primarily because the file extraction can be handled in different ways (for example you may want to do this asynchronously using Coroutines or implement other custom behaviour to handle this).

 

 

Dataset does not exist error when using Unity 4 Android Splitter

April 3, 2014 - 4:49am #88

Hi, just to clarify, this issue has been considered also in the past, and rest assured that we will post updates when these become available;

but please also note that:

1. there is no need to use old versions of Vuforia, such as 2.6.7 (e.g. to change the DataSetImpl.cs script);  

that the proper way of Loading Datasets in the general case is by using the Load API of the DataSet class, see API reference:

https://developer.vuforia.com/resources/api/unity/class_data_set

modifying the DataSetImpl.cs would only be required if you want to use the DataSetLoadBehaviour script component of the ARCamera for loading DataSets up-front at scene startup via Inspector settings in the Unity Editor;  however, this is only a convenience mechanism / shortcut which has been introduced to speed-up the application setup via the Editor and which can be easly py-passed by using the Vuforia API for loading datasets.

See also this thread:

https://developer.vuforia.com/forum/faq/unity-how-can-i-handle-large-android-apps

2. Image targets that are associated to Datasets that are loaded programmatically,  can also be augmentated programmatically, as explained for example in this article:

https://developer.vuforia.com/forum/faq/unity-how-do-i-get-list-active-trackables

3. The downloading and extraction part of the Datasets would be better kept at application logic anyway, since this can be done in different ways; for example, as a developer you may want to do this asynchronously (ususally this is the recommended way), due to the potential loading/extraction processing time.

 

 

 

Dataset does not exist error when using Unity 4 Android Splitter

April 3, 2014 - 3:53am #87

Hi,

This has been an issue for a long time now, im surprised its taken this long for it to be raised.

Now, I appreciate this is a free product, but surely customer service is still a top priority here. We have been asking for an elegant solution on this for a long time, and I believe that at once point we was told the Vuforia team was looking into it, but nothing was released.

I (and everyone else here) would greatly appreciate it if a modertor could give us frequent updates on this matter, so we know if we can expect to see a fix from the Vuforia team, or if we still have to hack around the issue or even roll back to a previous version of Vuforia.

I want to end that this is a superb product, and something that allows us to create high quality and visually appealing apps, and I hope that this issue gets fixed soon.

Adam

Dataset does not exist error when using Unity 4 Android Splitter

March 29, 2014 - 7:12am #86

Hi FourStoryCreative,

I will raise this issue with the Vuforia team, as it appears to have become an increasingly popular subject, indeed.

 

Dataset does not exist error when using Unity 4 Android Splitter

March 28, 2014 - 11:21pm #85

As of this post there are 7120 views for this thread . . . this by far dwarfs any other thread topic on these forums. 

Simple take-away: this is an important issue for those desiring to use the Vuforia AR Extension for Unity to develop for the Android platform. This issue warrants being addressed by Qualcomm. A quality solution needs to be provided.

In the past we have implemented a solution for our projects based on this thread that basically involved two steps:
1. copy dataset files to External SD
2. read those files by making some minor changes to DataSetImpl.cs

The problem now? DataSetImpl.cs has been wrapped in a dll file and can no longer be directly modified. Why the change to wrap the code in dlls?

The solutions currently offered have many more challenges and for us is now going to be much more labor intensive . . . especially for our larger, complex projects.

It feels like we are going backwards, not forwards.

What can be done to impress upon the decision makers the importance of addressing this issue?

Dataset does not exist error when using Unity 4 Android Splitter

March 21, 2014 - 6:33am #84

Do you know approximatively when the next release of Vuforia that will fix this Dataset issue will be released ?

No, no news about this at present.

 

I have tried to implement the innovartis method on a previous version of vuforia (2.6.7) without any success (ARCamera is windowed when I build on android using Unity 4.3.3. ??.)

Vuforia 2.6.7 is not compatible with Unity 4.3. You need to use unity 4.1 or 4.2, or otherwise upgrade to vuforia 2.8.7, which supports Unity 4.3 as well.

Dataset does not exist error when using Unity 4 Android Splitter

March 20, 2014 - 11:29am #83

Hi Alessandro,

Do you know approximatively when the next release of Vuforia that will fix this Dataset issue will be released ?

I have tried to implement the innovartis method on a previous version of vuforia (2.6.7) without any success (ARCamera is windowed when I build on android using Unity 4.3.3. ??.)

Thanks a lot !

Dataset does not exist error when using Unity 4 Android Splitter

March 18, 2014 - 3:26am #82

alvaroem wrote:

Regarding to the warning, I don't get it, since OBB splitting is a feature you have to activate on demand, by checking the "Split Application Binary" checkbox. Why would you need a warning to know when is being used something you requested to be?

I don't need it now anymore. But before I found out about this issue I had no idea why my datasets weren't loaded anymore. So for other users who haven't read this thread there is no indication that this error and the checkbox are related. So even if Qualcomm decides not to fix this, they should definately help their user's to find out, why Vuforia stops working...

Dataset does not exist error when using Unity 4 Android Splitter

March 17, 2014 - 3:04am #81

Hi, vbox.

 

I recommend you to read Alessandro's comment.

The official position is that they don't consider this to be a bug. Anyway, they are studying to include a feature to manage this issue in a future version.

 

Regarding to the warning, I don't get it, since OBB splitting is a feature you have to activate on demand, by checking the "Split Application Binary" checkbox. Why would you need a warning to know when is being used something you requested to be?

 

Regards,

 

 

Dataset does not exist error when using Unity 4 Android Splitter

March 17, 2014 - 2:40am #80

Thanks for the help given here.

Is there an idea when will this bug be fixed in the Unity Extension by Vuforia? At least a warning when OBB splitting is used would be usefull addition...

Dataset does not exist error when using Unity 4 Android Splitter

March 3, 2014 - 5:01am #79

I managed to get everything working by copying the video files out of the obb into the Application.persistentDataPath then in VideoPlayerHelper.SetFilename I am calling

mFilename = Path.Combine(Application.persistentDataPath, filename);

I am having a strange error now though as my videos will play the first time they track, but then second time around they fail, and the VideoPlayer.MediaState is ERROR. I can't see how this is becoming the case when they worked the first time...

Log in or register to post comments