Reputation: 1497
I am trying to make a apk with .obb files, alpha on the store, however when trying to download the .obb it doesnt extract correctly or doesnt load all of the content I am not sure, any help would be appreciated.
its an Android structured app, with a assets folder coming from Unity, (which is the .obb file im making).
I have used the Downloader, License and Zip libraries Google recommends.
The two scenarios I am currently stuck at is:
[Scenario 1]
Using Unity to make a .obb file
The file contents from the .obb Unity generated for me:
The application downloads the .obb files correctly, but once i try and launch anything Unity related in the app, it searches for files Unity didnt add to the .obb file and breaks.
[Scenario 2]
I just made my own zip file of the assets folder containing alot more content:
gave it the correct naming convention
main.versionCode.packageName.obb
The apk downloads correctly and starts downloading the .obb file, but fails on 99% with no logs.
Has anyone come across this issue? or maybe can point out what I am doing wrong?
thanks!
Upvotes: 3
Views: 2272
Reputation: 125315
You use Unity 5.5.1 and this is a bug.
Quate from Unity 5.6 release note.
- Android: Fixed reading assets from OBB (ApplicationPath). (893913)
You do have to download Unity 5.6 or above in order to fix this problem. I don't think there is another way to fix this without updating.
Other things I recommend you try before updating:
1.From the Build Settings, change the Write Permission from Internal to External (SDCard)
2.Explicitly add android.permission.WRITE_EXTERNAL_STORAGE
permission to the AndroidManifest file. This post describes how to use custom AndroidManifest to your game.
3.Use Unity's free Google Play OBB Downloader plugin to download the OBB data.
I think that the problem is loading the file so if #1 and #2 does not work, you should definitely update to 5.6 to get the version of Unity that fixed this problem..
Upvotes: 1