progress44
progress44

Reputation: 33

Unity support for an app Split

I just built an app for Android using Unity3D. The app weighs 200mb. During testing I used to build a single apk which always worked. Now that I uploaded it on PlayStore, I had to use Unity's built in split feature which creates an apk and an obb file.

My problem is that now the app isn't working. It seems like the obb file isn't being loaded properly and the app doesn't find the files.

I have some assets in StreamingAssets folder which are loaded dynamically and the app doesn't seem to be able to find these along with the other scenes.

What I did to try to fix this with no success:

What am I doing wrong? I had a working app, then I enabled Split Application Binary in Player Settings > Publishing Settings and it stopped working. Disabling the feature, the app works but can't upload it on Google Play as it has a 100MB file limit.

Upvotes: 1

Views: 1397

Answers (1)

Simon Raes
Simon Raes

Reputation: 461

You mentioned using UniWebView. The documentation recommends placing your web files in the Assets/Plugins/Android/assets/ folder.

If you are using "Split Application Binary" for Android build (obb files), you should not put your local HTML files under StreamingAssets folder. Instead, you need to put them to Assets/Plugins/Android/assets/ and then you can use the same way as you did for normal streaming assets resource to load it from the new location.

https://docs.uniwebview.com/guide/loading-local-files.html#using-split-application-binary.

Unfortunately this will simply move the files from the .obb to the .apk file, which might push you over the 100mb limit again.

Upvotes: 1

Related Questions