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
I’ve only done one Android release so far so I’m far from an expert unfortunately.
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.
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:
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:
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.
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.
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.
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.
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.
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.
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?
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?