I am working on an AR Project using vuforia unity3d. I need to play an Animated texture sequence on an image plane. I have created the assetbundle for the textures. So when I show the image target infront of the webcam, I have been able to play the sequence properly on the Unity editor. But when i view the image target via the android mobile camera, the plane appears but not the images. Previously i had kept the textures in the project folder itself and I was able to load it successfully on the editor and android phone. But when i changed them to an assetbundle, I am able to play it on the editor but not in the android phone. I am not able to comprehend what is wrong over here. Can anyone please explain what mistake am I doing here
- Sort Posts
- 5 replies
- Last post
Loading Textures from AssetBundle
Thank you for your valuable suggestion. I tried doing it without using Vuforia and the AR camera. I first tried loading the images from the folder and the image sequences worked fine. But when i tried using the Assetbundle i still got the same result.
Loading Textures from AssetBundle
OK. In this case, you will want to verify that you can load the Asset Bundle and reproduce the same issue without using Vuforia (i.e. just with a Unity project with a standard Camera and no Vuforia ARCamera or other Vuforia prefabs),
and nail down the actual cause of the issue, as this sounds like possibly related to Unity itself, rather than Vuforia.
Loading Textures from AssetBundle
Thank your for your response AlessandroB. I built my assetbundles with the Buildtarget set to Android. This is the code I used :
public class AssetBundleExporter
{
[MenuItem("Assets/AssetBundle/Android")]
static void ExportAssetBundle()
{
// Bring up save panel
string path = EditorUtility.SaveFilePanel ("Save Resource", "", Selection.activeObject.name, "");
if (path.Length != 0) {
Object[] selection = Selection.GetFiltered (typeof(Object), SelectionMode.DeepAssets);
BuildPipeline.BuildAssetBundle (
Selection.activeObject,
selection, path + "_android.unity3d",
BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets,
BuildTarget.Android);
Selection.objects = selection;
}
}
}
Loading Textures from AssetBundle
Hi, this might be due to the BuildTarget that you did select when creating your AssetBundle:
- AssetBundles can be built for different target platforms (e.g. Windows, Android, iOS, ...); therefore, if you build the AssetBundle by yourself, make sure to select the appropriate BuildTarget option (for example, an Asset Bundle built for Windows might not necessarily work when imported into an Android app); also, AssetBundles built with a previous Unity version may not be compatible with newer Unity versions; for more details, see:
See also:
https://developer.vuforia.com/forum/faq/unity-how-can-i-augment-my-image-target-model
Thanks, so this suggests it is not related to the use of Vuforia. Might be worth consulting the UNITY website / forum.