Unity Asset Delivery

4 views
Skip to first unread message

Rosy Demorest

unread,
Aug 5, 2024, 10:29:04 AM8/5/24
to brookfetdehen
Iwant to upload an aab file from my unity project to my play console account, but unfortunately, my file was rejected because it's size is larger than the 150MB threshold limit for aab on google play store.

Then while looking for a solution, I found out that obb files are now made obsolete and I could use google's Play Asset Delivery system to upload my file. So then I followed the "not so clear" instructions on how to use the PAD system in Unity, I made an asset bundle that contains all my font asset(because that was what increased my aab from 120MB to 260MB), and added it to the Asset Delivery Settings in Unity and selected "Separate Base APK Asset". Then I built the aab file using PAD(by clicking Google > Build Android App Bundle), and my generated aab went from 260MB to 680MB.


If you're relying on Unity only to use PAD (Play Asset Delivery), Unity's solution has problems and doesn't assemble the AAB properly, basically, it will get everything you have in your StreamingAssets folder and that will be packed in an asset pack + it will keep the StreamingAssets stuff in the base.apk archive, making your final AAB and APKS at least double the size it should be or more.In order to use PAD properly, you should follow up on Google's explanations about it here -delivery and come up with your own version of what Google suggests, I say it because I just finished our own PAD solution in my company and I ended up writing stuff for Runtime, Editor and Build on Unity. It's all working as expected for us. Google's plain solution for Unity is no silver-bullet either, it will probably just work for a fraction of projects out there.


LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.


The Unity Asset Delivery Bundle is a comprehensive solution designed to simplify the distribution and integration of assets within Unity projects. It addresses common challenges developers face, providing a seamless experience for effectively sharing, managing, and utilizing assets.


1. Effortless Asset Sharing: Tired of complex asset-sharing processes? The Asset Delivery Bundle simplifies this by offering a user-friendly interface that allows developers to share assets effortlessly. Whether working on a single project or collaborating with a team, this feature ensures a smooth and efficient workflow.


2. Version Control: Bid farewell to versioning headaches! The Asset Delivery Bundle includes robust version control mechanisms, allowing developers to keep track of changes, roll back to previous versions, and confidently collaborate. This feature ensures everyone on the team is on the same page, promoting consistency and minimizing errors.


3. Optimized Asset Loading: Performance matters, and the Asset Delivery Bundle understands that. It optimizes asset loading, ensuring that your project runs smoothly and efficiently. With enhanced loading times and reduced memory footprint, developers can create immersive experiences without compromising performance.


4. Centralized Asset Repository: No more searching for assets across multiple folders! The Asset Delivery Bundle introduces a centralized repository where developers can store and organize assets systematically. This not only improves asset management but also facilitates easy access and retrieval.


- Time Savings: the Asset Delivery Bundle saves developers valuable time by simplifying asset sharing and management. Spend more time on creativity and innovation and less on navigating complex asset workflows.


- Improved Collaboration: Foster a collaborative environment where developers can seamlessly collaborate on projects. The real-time collaboration feature ensures everyone is in sync, promoting synergy within the team.


- Enhanced Project Stability: Version control and optimized asset loading contribute to a more stable project environment. Experience fewer crashes, smoother performance, and a more reliable development process.


- Scalability: Whether you're working on a small indie project or a large-scale production, the Asset Delivery Bundle scales to meet your needs. It adapts to the size and complexity of your project, ensuring flexibility and efficiency.


3. Join the Community: Connect with fellow developers, share your experiences, and seek advice in the Unity Asset Delivery Bundle community. Collaboration extends beyond the software, and the community is a valuable resource for insights and support.


Updated: Unity has released an official example for using Play Asset Delivery with Addressable Assets which used Unity built-in bundle management and build system.


Unity have a official document for Addressable Assets. It provides core concept, implement guide, migrate guide for old project and some sample but this doc is changed per release versions of the package.


Sometimes, window block access to folder on C driver. Try move your project in to the same parent folder with the test project which is working.

Btw you must change AssetBundle Provider into Asset Pack Bundle Provider in the inspector!


I have a few issues in my game.

1. Every time before a build, do we have to do a default addressable build before doing a play asset delivery build?

2. After building the android app bundle, the addressable asset bundle is placed inside the customFastFollow folder rather than unityDataAssetPack folder. This causes an exception

RemoteProviderException : Invalid path in AssetBundleProvider:

What should I do to resolve this?


Good tutorial !

I have a question for the last step to build the Android App Bundle(AAB), could we proceed with Unity Cloud Build(UCB) ? Will UCB can support PAD, ? So far there is no UCB documentation found regarding PAD, or maybe I miss out.


I already tried use yield return or while(!isDone) on AndroidAssetPacks.GetAssetPackStateAsync even I tried add AndroidAssetPacks.DownloadAssetPackAsync but the method always skip the next frame not awaitable.


I will have a look at the sample project this weekend. Btw, thank for your awesome note. Last time i used this API, it always returns 0 then suddenly the download completed. May be my bundle is too small.


1. Delete all addressable groups that were automatically converted by Unity.

2. Start from scratch and manually put assets that are only needed to addressable groups.

3. Delete all existing asset bundles in your StreamingAssets folder

4. Rebuild


I am following the Unity PAD Sample project to implement Addressables with PAD in our project. I am testing with one Addressable group which is set as on-demand delivery but when .aab is uploaded to Play Store it all acts like everything is instal-time. Here is more info regarding my issue:

-asset-delivery-with-addressables.1480656/


Hello!

Thank you for the amazing guide, I used the Unity official/unofficial guide, but yours has more details and helped us setup everything to finally get the aab to download and use the assets in-game!

We ran into another issue a bit later in the game, and was wondering if this is something you ran into or know how to solve;

Wrote about it on the Unity Forum as well: -asset-delivery-addressables-crash.1489486/


Hi. I would like to export some assets from unity, for example materials and meshes. They end in .asset format.

How can I export these so that I can import the exact same assets into threejs?

Thank you !


Alongside the asset packs that Unity generates automatically, you can also create your own custom asset packs. This is useful when you need to control what an asset pack contains. Unity adds your custom asset packs to the final Android App Bundle. For more information about custom asset packs and how to set them up, see Custom asset packs.


For asset packs that Unity automatically generates, Unity does not support changing the delivery mode. If you want to change the delivery mode of an asset pack, create custom asset packs with your assets.


After you have the names of your asset packs, to check the status of each asset pack, call AndroidAssetPacks.GetAssetPackStateAsync, passing in the asset pack name. This returns the status of the asset pack you query, and you can use the result to determine whether you need to download the asset pack. If you want to quickly query the status of every Unity-generated asset pack, you can use AndroidAssetPacks.coreUnityAssetPacksDownloaded. This is useful because you must ensure that every Unity-generated asset pack is available before you load any scene other than the first one or try to access other resources that Unity handles.


For every asset pack you need to download, call AndroidAssetPacks.DownloadAssetPackAsync, passing in the asset pack name. While the asset pack downloads, monitor the download status, because downloads can pause or fail. There are two ways to do this:


If you want to control which non-code resources are in a particular asset pack, you can create a custom asset pack. Unlike Unity-generated asset packs, you can set the delivery mode for custom asset packs. If you create a custom asset pack, be aware that the Google Play Store has size and quantity limits for asset packs. For information on the limits, see Download size limits.


This sets the delivery mode to fast-follow, which means Google Play automatically downloads the asset pack after it installs the application. For information on the format of this file, see Integrate asset delivery.


In the dynamic realm of game development, Unity Asset Delivery Bundle stands tall as one of the leading engines, empowering developers to create huge and visually stunning experiences. As the demand for more prosperous and complex games grows, efficient asset management and delivery becomes increasingly crucial. Unity Asset Delivery Bundle emerges as a game-changer, offering a streamlined solution to optimize asset delivery, enhance performance, and elevate the game development process.

3a8082e126
Reply all
Reply to author
Forward
0 new messages