cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an "Unable to open archive file" error

Anonymous
Not applicable
Hello, hope someone could help. I'm working on a Oculus Quest project where we need video files to be placed in an asset bundle which will be read from later. I've been following the "Tech Note: Expansion File with Unity" guide (you'll have to search this up as I'm unable to post links)

I managed to build my asset bundles and unity is building them as obb files. I've transferred the apk and obb files over via adb. Currently I've hardcoded the bundle directory instead of using the suggested method of using the provided plugin; I wasn't sure where to place the java file and I was getting a java exception via logcat (presumably the app can't seem to execute the java file?). The Unity application loads fine; it's a scene with a ScrollRect that should get populated with the video file names that's stored in the asset bundle. However the issue is the ScrollRect doesn't get populated, and the I'm seeing an message via logcat: "unable to open archive file" and "Failed to load asset-bundle". The directory that the first error message provided is correct as I've double checked the file names. I've tried changing the compression method for my AssetBundle creation script to UncompressedAssetBundle and ForceRebuildAssetBundle as someone in the comment section suggested but that didn't seem to work either.

So has anyone encountered this similar problem? Is there guide still accurate in terms of loading assets from an asset bundle?

One thing to note is that when I view the headset directory with the windows explorer I can't seem to find the obb file in the Android/obb/ directory of the headset; are apk and obb files that get copied over via adb set to be hidden when trying to view them through explorer?

Also I'm not sure if this is important, but I skipped the making a plugin bit under the "Read Permission" section; I wasn't able to get a Android Studio project working, but also I got the impression that I could do without it. I was able to view the manifest and ensured that I had the READ_EXTERNAL_STORAGE set.

Thanks

0 REPLIES 0