3

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 enter image description here

The file contents from the .obb Unity generated for me: enter image description here

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:enter image description here

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!

Bohrend
  • 1,467
  • 3
  • 17
  • 26
  • have a look at this http://stackoverflow.com/questions/11715855/steps-to-create-apk-expansion-file/11717019#11717019 – Brendan Van Der Merwe May 12 '17 at 05:05
  • Hi Brendan, this is one of the guides i followed, everything works up until the actual download from the play store which just fails with no output, or when i use Unity to make the obb file, Unity doesnt include some files need by the app – Bohrend May 12 '17 at 05:33
  • What's your Unity version? – Programmer May 12 '17 at 05:36
  • Hi, 5.5.1, however I wont be able to upgrade due to structural changes that will need to be made – Bohrend May 12 '17 at 05:47

1 Answers1

1

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..

Community
  • 1
  • 1
Programmer
  • 121,791
  • 22
  • 236
  • 328
  • thanx for the help I will mark as answered, but I made some progress in scenario 2, however I am not sure how to extract the obb file or if I need todo it manually? : https://stackoverflow.com/questions/43934743/how-to-extract-obb-file-in-android-to-the-assets-directory – Bohrend May 12 '17 at 09:57
  • I will comment on your other question – Programmer May 12 '17 at 09:58