In 2021.2, Unity provides direct support for Android’s new expansion file format, Android App Bundle (AAB) for asset building. Using AAB, developers can meet the Google Asset Delivery requirements to publish any new apps to Google Play.
So far, when my application is above 150 Mo I have to use Google Play Asset Delivery feature in order to be able to upload my app. What this new feature will change exactly ?
The new feature will use Play Asset Delivery functionality (you can follow this link to read more about it Android Developers ) to provide a similar functionality to what was available with apk + obb. What was packed in obb previously will now be packed into asset packs inside of the AAB. Note that OBB had only two limits:
file count limit (main obb and patch obb, where only main obb could be automatically generated by Unity)
size limit (up to 2GB per file)
however the new system has much more limitations and some manual project adaptations might be needed when switching from APK + OBB to Asset Packs in AAB. If your current APK + OBB setup is smaller than 1GB, then most likely no project changes will be required apart from changing build type from APK to AAB. In other cases there will be required changes to the project based on the size and the way it is set up. It will be also possible to create custom Asset Packs regardless of automatic application splitting by Unity.
Hum … so not sure what is the benefit here ? As of now our OBB files are created from AssetBundles and the very reason we use OBB files is because our app size is greater than the 150 Mo limits. With AAB file do we still have to pack assets using AssetBundle and then retrieve those using PAD ? If so, what is the benefit ?
Presumably this works even if you don’t use AssetBundles.
It’s to create a bridge for those that were relying on APK + OBB, or people that simply don’t want to use asset bundles, and don’t want to restructure their games to be able to publish on Google Play with aab.
@AcidArrow how will that prevent to use AssetBundle ? Genuinely question here, because when your app is over 150Mo you have one way or another create OBB file or assets packs which I think (but I might be wrong) are created from AssetBundles and then retrieved using the PAD API. I’m not quite sure for asset packs, so maybe I’m missing something here.
My understanding for the Unity feature is that the asset packs are auto generated (if final build is less than 1gb) and you don’t have to create or use asset bundles.
AcidArrow is correct. This will not force the project to use asset bundles, The main idea right now is exactly as AcidArrow said “It’s to create a bridge for those that were relying on APK + OBB”, so if your build with OBB was less than 1GB, the only thing you should need to do when the feature is available is to switch the output format from APK to AAB. If the final build is bigger than 1GB, then due to asset pack limitations, you might have to do some manual project changes and you would also have to ensure required asset packs are downloaded (there will by new Unity APIs for that which will be wrapping PAD APIs).
I have a question , is these PAD API already availbale in the new unity 2021.2b?
I’ve just compiled my app successfully with this unity version, but i receive the warning that my aab is bigger then 150mb, and Play Console dosesnt accept it … once i remove everything on the StreamingAssets folder and recompile the app, i get an aab with 113Mb only.
Generating an app bundle, in 2021.2 has the same result as generating in 2021.1, at least for now. I was wondering how could i user Google PAD in Unity without AssetBundles.
In Google’s implementation, it is possible to get the name, offset, and length of the file being stored as AssetLocation, but is there a way to get the equivalent information as Unity’s API?
This is a very important aspect of implementing AssetBundle encryption in Streams.
The Unity solution is not available yet.
2021.2.0b4 should be the first version which will have it. We are planing to have a solution in 2019LTS, 2020LTS and 2021.1 by the end of this month.
Note that Google Play requirement to publish AAB instead of APK is for new apps only. Updates to existing apps can still be published as APKs https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html
I am not sure what type of Google’s implementation you are talking about. Could you provide a link to the documentation?
Also you wrote AssetBundle. If you use AssetBundles, then you will be able to continue using them. They would simply get packed into asset packs, so you would download the asset pack and get the path to the AssetBundle using Unity’s API and then would use Google’s APIs to access AssetLocation information inside of the AssetBundle.
New apps as in we already published it? We hav several apps that in Early Access ( Open Testing ), is that still consider new app and need to use .aab when we hit the publish button?
"In 2021.2, Unity provides direct support for Android’s new expansion file format, Android App Bundle (AAB) for asset building. Using AAB, developers can meet the Google Asset Delivery requirements to publish any new apps to Google Play."
Does that mean it’s “integrated”?
Now I’m using 2021.1.15f1 and I installed a plugin/extension for the google asset delivery and it doesn’t work at all.
We’re trying to figure it out since nearly two weeks and the only thing it does when you want it to separate your base apk asset is that it creates a totally messed up aab-file that installs an app that doesn’t start (black screen then crash -nice)
apk and obb work(ed) like a charm. This whole aab/google asset delivery destroyed our whole project planning.
Maybe if its integrated in unity itself it will work…
2021.2.0b4 was released 6 days ago and it has this feature in it. The documentation on how it works can be found here Unity - Manual: Play Asset Delivery (note that some scripting API links in this page are currently broken, but you can go to scripting documentation for Unity 2021.2 and find those APIs manually).
As I have written previously, we are going to bring this feature back to supported Unity versions and it will work the same as it is described in 2021.2 documentation.