- Home /
Google Play OBB Downloader still needed?
Hi all,
Does anyone know if the GooglePlayOBBDownloader (http://u3d.as/content/unity-technologies/google-play-obb-downloader/2Qq) is still required as of Unity 5.5?
I'm working on a game that's 500mb+. I'm building and uploading it as a split binary and it works fine without the GooglePlayOBBDownloader.
Can someone clarify why Unity says we should integrate the GooglePlayOBBDownloader (https://docs.unity3d.com/Manual/android-OBBsupport.html) when the game works perfectly without it?
Thanks.
Good question.
Google Play will automatically install and download the OBB. If someone manually removes the OBB file from /sdcard/Android/obb/your.package.name Google Play won't automatically restore the file. So the game code would need to handle restoring the OBB.
Answer by andrew_2992 · Nov 07, 2016 at 05:49 PM
Hello!! @tgraupmann @HOS I'm very interested in this thread, I just posted a topic myself about the same kind of issue. All of the tutorials and information regarding .obb downloader seems to be from around 2012 - 2013 and in some cases 2014... The lack of tutorials and resources makes me think that the whole thing has been deprecated. (also the main resource everyone is using is not good) (https://www.exoa.fr/tutorial-unity-4-apk-splitting-google-play-obb/)
My main question is if people don't delete the .obb file after it has been initially downloaded, can I safely assume that their files will be automatically downloaded when they install the application?
Maybe there are some people in other continents that have very very old almost second hand refurbished phones and might run into a problem but is this kind of thing generally taken care of these days on modern devices automatically?
I found with Unity and split OBB, you'll want to make sure the App version and OBB version match. So when I upload a build to Google play, I always upload a new OBB file to make sure those versions match.
When the user installs via Google Play that will auto install the AP$$anonymous$$ and OBB file that goes with it. But if there's not enough space for the OBB file, there's a chance it won't be available. So you'll need code to detect that.
In the Android SD$$anonymous$$, in extras you'll find the sample code for the OBB downloader which you'll need to customize. Or you can use the Unity OBB downloader package. I used the custom OBB downloader option.
I have this all working and downloading in 2016. So it still works.
Answer by Carl201010 · Dec 05, 2016 at 06:08 PM
I'm finding that the split OBB download from Google play is reliable, so @tgraupmann 's comments about file deletion make sense to me (thanks). However, I have an issue with certain devices not recognising the OBB file until they are restarted, which is very annoying. The OBB downloads correctly and is placed in the right location, but the APK cannot seem to call the OBB until the device is restarted. Then it's fine. Any ideas? Thanks.
I customized the OBB downloader in JAVA and the download completes before launching the Unity activity.
I'm seeing that the download has actually completed and installed, but still will not run - first time only. Going back through forums and comments I have the impression that Google have fairly recently improved the OBB process overall (as you say, requiring an upload that corresponds to the version but then auto-rena$$anonymous$$g it to the main.version.co.game format) and with Samsung devices at least not making the 'open' button available until after the app has installed. The loading bar from the play store correctly recognises the size of the complete package, AP$$anonymous$$ + OBB. I can see where I might need to accommodate for the OBB not downloading correctly, but I can't see where to accommodate for the app not recognising the OBB until restart after the OBB has downloaded and see$$anonymous$$gly installed correctly. I am perplexed...
You need to use a separate activity to download the OBB. When the OBB has been downloaded and verified, then you start the activity that loads Unity.
@Autonoma Unfortunately I have not. A little more detail: I created an initial scene that calls the 'rest of the game.' The scene contains only a single graphic and in this instance a Playmaker FS$$anonymous$$ that calls the main menu (I think the fact it's an FS$$anonymous$$ is neither here nor there, but anyway). On the initial download from Google Play, this scene does not load; it is presumably being lumped in with the 'rest of the game' when the binary split is performed. I am unclear as to how to prevent this from happening, or if in fact it is the root of the problem anyway. The reason I say that is that if the issue were Google Play, for whatever reason, not in the first instance finding the path to the FS$$anonymous$$ but finding it subsequently, then this is the kind of behaviour I would imagine. I take tgraupmann's point, but the use case he describes sounds very slightly different, in that I am convinced the AP$$anonymous$$ is not being run before the OBB has finished downloading. I wish I could find out more about what Google Play does with the AP$$anonymous$$ when it initially downloads it, because this seems to be where / when the problem occurs; I can see the OBB in the correct place (i.e. the location where it is subsequently found after re-starting) which makes me wonder about the AP$$anonymous$$. Anyway, I think it's going to take someone who knows more about Android than me to resolve this. All I know for certain is that it works fine on iOS - and sells a lot more there too. Hashtag Just Saying :)
That seems like it's a little different than my issue - my initial scene loads (from AP$$anonymous$$), but not the scene that is supposed to be in the OBB. However, restarting the device allows both the initial scene to load and the scene that's in the OBB. But this is only happening on some lower-end devices.. it's so weird.
And I hear you about iOS! :)
Same issue, and not on a lower end device, I have tested on a Samsung S7 and have seen this issue.
I uploaded a alpha empty project to Google Play with 2 nearly empty scenes, the obb is 200kb and it still fails to load after app install, it works after restart though.
Bug is driving me crazy...
Answer by theylovegames · Apr 21, 2017 at 09:26 AM
You should use a custom activity to download the OBB. Upon completion, then launch the Unity activity. That way a restart won't be needed.
Any tutorials/tips on how to do this ? I'm not very familiar with android program$$anonymous$$g, I'm just downloading the game from google play and I let the google app manage the entire download process, it properly downloads and puts the file in the correct place, except that it has the wrong owner and I can't access it, unless the device is restarted and then the proper owner is given to the file... As explained here : https://issuetracker.google.com/issues/37075181
Answer by GuilhermeDuartt · Oct 08, 2017 at 07:50 PM
Hi, so I'm in doubt about the .OBB is it really necessary to install the unity asset right? "Google Play OBB Downloader". By searching I made some devices do not download the .OBB. So the application has to check if the .OBB exists and download it. I was wondering how to set up this google asset because it asks for a Public Key and I do not know where I can get it.
Here's a tutorial: https://www.exoa.fr/tutorial-unity-4-apk-splitting-google-play-obb/