- Home /
How to work with (main|patch).obb ?
Hi guys, I am creating this question because I don't managed to find a reply about it.
We have a custom update system in our Android App, where we can to create a new version only to replace a new picture or sound, for instance. So my questions are:
Question 1 - Every time we build a new APK, we need also install the new OBB, or can we keep the old OBB running with the new APK? In my tests, I can only to use the APK + OBB pair created in the same build, the only difference I found in different APK + OBB Build is the hash code (line 6) in the file bellow. But if I change this hash code, the APK will be broken and can't be used to install in the device: my-game.apk/assets/bin/Data/settings.xml:
```
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<integer name="splash_mode">0</integer>
<bool name="hide_status_bar">True</bool>
<bool name="useObb">True</bool>
<bool name="5692d9e84beb3702c8db627c706073c0">True</bool>
</settings>
Question 2 - How to create the patch.obb? I can't find a post or tutorial about creating the patch.obb with Unity.
Answer by sandolkakos · Oct 29, 2020 at 10:54 PM
Hi @evan_spiegel , as you can see it has quite some years since I created that question and, to be honest, at that time we ended up having to work with the built pair (APK + OBB). So for any update in our app, we needed to build another pair and update the whole App.
But, it has already some time I decided to not make use of OBB in new projects. I use Asset Bundles instead, and today we have also the Addressable Assets to help in the Assetbundles integration. I strongly recommend you to make use of Addressable Assets, because the OBB is only for Google Play and the Addressable would use the same architecture for any other platform. The usage of Addressable will also help your apps to have better performance. Read more about it here: - https://docs.unity3d.com/Packages/com.unity.addressables@1.16/manual/index.html
Thanks so much for your response! I've looked into Addressables a little but I will look into them more, they sound pretty useful.
Answer by evan_spiegel · Oct 29, 2020 at 06:33 PM
Hey there, did you ever find a solution to this? I am also trying to figure out how to use the patch obb with Unity and having trouble finding useful information online.