Help Please - Question about Google Play OBB Downloader

My APK is bigger than Google’s 50Mb limit. So, I need to split it. I am trying to work out the right way to do this.

I have googled for a few days and I have a lot of resources to use.

One of the key unanswered Questions I have is; Should I use Unity’s Google Play OBB Downloader?

This question has been posted in another thread
(here)

But unfortunately not answered.

My concern is the comments on the Asset store that advise not to use it.

If I don’t use this asset, my next questions is, How do you manage downloading the OBB?

I am desperate for an answer to these questions. Please help.

THx.

yes man u should download obb
cause it will work well on google play

Thx M.Y.

You shouldn’t need to do anything special? There’s an option in Unity’s Android Player settings to do the split. Then, when uploading to Google Play, you just need to upload your APK, and THEN upload the APK again as a new version. On the second upload you’ll get a dialog box asking if you want to add any OBB files. At that point you can upload your OBB and you’re all good.

My understanding was that, the APK and OBB get uploaded to Google, as you said.

But when the customer purchases the game on Google Play, their device will download the APK file and only sometimes the OBB.

In the case where the OBB is not downloaded with APK, the first scene in Unity needs to detect this and handle the downloading of the OBB. This is what the “Google Play OBB Downloader” asset does.

Steve, are you saying that this is no longer needed? i.e. OBB will always be downloaded with APK?

Hmm… don’t know about that then. All I know is that I uploaded a build, and it never asked for the OBB. The Google Play store (customer facing) said the game was 8MB to download. I did some reading and didn’t find much, then decided to upload again. The second time I got the additional dialog which uploaded the OBB, and then the store entry updated to say 58MB. At that point I assumed everything was all good…

…now you have me worried :slight_smile:

I’ve only done one Android release so far so I’m far from an expert unfortunately.

Sorry, didn’t want to cause worry for anyone else.:wink:

I found this on Google Play developer:

http://developer.android.com/google/play/expansion-files.html

It essentially says you need to cater for downloading the OBB.

I am just concerned about the Negative comments on the asset store against Unity’s OBB downloader. It looks like it could be painful implementing. From the comments, I gather it has some compatibility issues with v4 of Unity.

I’ve spent the last few days attempting this OBB thing to work.

The confusion seems to stem that the way the OBB thing works has changed. The more recent threads / information is here:
http://forum.unity3d.com/threads/135224-More-Google-OBB-drama/page3

The gist is this:
1. you don’t need to use any “downloader scripts” - just click the “split application binaries” checkbox in the player settings
2. you must rename the created OBB file like so:

[main|patch]...obb

main.314159.com.example.app.obb

does this mean no versions like 1.0 only 2334? I think so…

3. for testing, place the obb file inside your device in these places:

/Android/obb/com.bigfishgames.google.heuiful/main.44.com.bigfishgames.google.heuifull.obb

/sdcard/Android/obb/com.bigfishgames.google.heuifull/main.44.com.bigfishgames.google.heuifull.obb

And… it should work! or in my case, not work. I want to go home…

Just an update- the OBB thing did end up working when uploading to google play (wasn’t able to get it to work for testing right away)

for that:
1. check the “split application binary” checkbox in player settings
2. build
3. rename your files as:

main.1.com.yourcompanyname.productname.obb
com.yourcompanyname.productname.apk

where “1” is the version number (no 1.0 or anything like that - it has to be 1-9999999).
and

com.yourcompanyname.productname

is your bundle id

example:

main.1.com.blizzard.warcraft.obb
com.blizzard.warcraft.apk

4. upload to google play - with each upload you have to increase the version number

1 Like

After my initial post in April, I optimised my project and managed to get the APK back under 50Mb. But after a few more months of development, my project has crept back over 50Mb and optimising won’t fix it this time.

So, today, I worked through splitting my project into APK + OBB.

For anyone else, trying to work through this. I highly recommend this tutorial:

http://www.exoa.fr/tutorial-unity-4-apk-splitting-google-play-obb/#comment-179

Here are some questions I found answers to as I worked through this process.

Note. My bundle identifier is, com.zoneoffun.ropez, I use this name to demonstrate naming conventions below.

  1. The obb file that unity creates is named, RopeZ.main.obb.
    a. You don’t need to rename this if you uploading to Google Play. When you upload, it automatically gets renamed into the correct format by Google…
    b. If you are going to side load it directly onto you Android device. Then you will need to rename it. This is the format: main.5.com.zoneoffun.ropez.obb, it needs to go into the folder ??/Android/obb/com.zoneoffun.ropez/ , I expect each device has OBB’s in a diferent location, so I have just given a partial path.

  2. The big question, Do you need to include a OBB downloader in your game? I don’t know… I tested downloading from google play without a downloader, and it downloads the APK and OBB at the same time and everything works. In researching, apparently some older devices won’t download them together. So just to be on the safe side, I built the downloader into my game. Using the tutorial found via link above, it didn’t take long, less than than 1/2 a day to code and test.

  3. You cannot use a APK with an OBB from a different build. It just doesn’t work. The pair unity creates in a build, must go together.

  4. Yurithebeast’s post above was helpfull. But just to clarifiy, the version number in the OBB file name is the “Bundle Version Code”, you can have decimal places in your “Bundle Version”. Also Yuri, renamed his APK. I didn’t need to do this.

  5. Be patient when you upload your APK & OBB to Google. It does take several hours before it is available.

Yes, you need a downloader. Not all devices download the OBB automatically. Also in some cases the OBB can be removed from the device in which case it needs to be re-downloaded.

4 Likes

“Not all devices download the OBB automatically”

Is there any documentation on which devices don’t download automatically? Is it older versions of Android?

“Also in some cases the OBB can be removed from the device in which case it needs to be re-downloaded.” - Could you just not request the user redownload the app from the store in this case?

1 Like

No other info?

I’m pretty sure it’s probably an older set of devices that are limited by the Play Store version or OS.

Also, you can’t just redownload a game unless you uninstall it, which would delete all data for that game.

What info are you needing?

Is all this Obb downloading relevant for Unity5?

If your app is over 100mb yes

Yeah the nice thing is that they just upped it from 50MB to 100MB so unless your game is going a little larger than a standard single dev game, you won’t even need OBB support!

yes we were testing spliting the app into apk and obb since its over 100Mb but testing on devices there is no downloading through intial scene but the complete app is downloaded from Google Play, so i wonder what is the relevance of obb downloader script

It has been answered: “Yes, you need a downloader. Not all devices download the OBB automatically. Also in some cases the OBB can be removed from the device in which case it needs to be re-downloaded.”

So, looking at the Unity doc and the forums, this is still quite confusing

  • Unity says you need to handle the download using their plugin mostly for older devices and in case the OBB gets removed from the device for some reason
  • quite a few developers say you don’t need to worry about it, you just make sure the OBB is renamed properly and you’re good to go

My project is only targetting recent devices running Android 4.4+, should I worry about this or just upload properly named APK and OBB to Google Play and that’s it?