Hi, I did an app for Android and I use the addressables solution to improve the “fluency” of my app and the load/unloading time for big data.
Now I have the issue with Google Play store and the requirement to create aab files and my app is larger than 150mb.
About the addressables :
I use the default settings
I use only AssetReference m_asset (for inspector)
In code I use AssetReference.InstantiateAsync() to load then Addressables.Release() to unload
I look at Integrate asset delivery (Unity)
But without succes
So now I don’t know what to do !
I can build an aab less than 150mb but my problem is how can I access to my addressables inside my app.
Do you have any simple solutions or tips ?
al57
November 8, 2021, 10:14am
2
Hi, did you find any solution on this i’m stuck on the same issue.
I have some video files that i need to seperate from the main aab due to file size limitation and i can’t acces the asset bundle…
Here is the logcat message
2021/11/08 11:11:44.106 20429 20540 Error Unity Unable to open archive file: /storage/emulated/0/Android/data/com.studio3wg.appbundletest/files/videos
Below is how i try to get the bundle
public void PlayAssetBundleVideo(string videoFile, bool looping, AssetBundle mediabundle)
{
//Debug.Log("Loading file " + videoFile);
// videoPlayer.source = VideoSource.Url;
videoPlayer.clip = mediabundle.LoadAsset<VideoClip>(videoFile);
// Debug.Log("videoPlayer.url " + videoPlayer.url);
videoPlayer.isLooping = false;
StartCoroutine(PlayVideo());
}
And this is the way a try to get the video inside that asset bundle .
public void GetBundle()
{
if (Application.platform == RuntimePlatform.Android)
{
// PlayAssetBundleRequest bundleRequest = PlayAssetDelivery.RetrieveAssetBundleAsync("videos");
MediasBundle = AssetBundle.LoadFromFile(Path.Combine(Application.persistentDataPath, "videos"));
}
else
{
MediasBundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "videos"));
}
}
Are you guys taking the AssetPack in consideration?
And also have you guys actually created and ‘released’ the app in test mode through google play to get to test all the features properly?
There is also some good information here Unity - Manual: Play Asset Delivery , I’m reading it now to try to learn a bit more before having the full feature working in the game.
Hi,
Here is my solution that works only for the delevry mode “install-time” so all the datas are downloaded when you download the app on Google Play.
I don’t need to change my code and I don’t need to add new plugins (like Play Asset Delivery from Google).
Just need to enable these settings :
To configure Unity to build Android App Bundles:
Open Build Settings (menu: File > Build Settings).
In Platform, select Android.
If Export Project is enabled, enable Export for App Bundle. Otherwise, enable Build App Bundle (Google Play).
To configure Unity to split the application binary:
Open Player Settings (menu: Edit > Project Settings then select Player).
Select the Android settings tab and open the Publishing Settings section.
Enable Split Application Binary.
Then at the end of the build, some warning popup appear and you have to accept all
Now your aab is ready and you can upload it to google play console
The aab has all the files for the app and all the big data (known as obb)