# What is the typical way of authoring and implementing dynamic asset loading via blocks, in Unity?

Suppose that you have thousands of individual resources that need to be loaded dynamically (e.g. some kind of procedural or randomized world that spawns all manner of things etc). There are many ways you could manage the resource loading, like Resources, or AssetBundles, or Addressables, etc.

There is another option, which involves putting your asset data together into "block" files. This is done notably in Genshin Impact, if you look at their StreamingAssets folder. I would like to learn more about how this is typically implemented in the context of Unity, but cannot find many resources online about it.

Off the top of my head, this could be as simple as having an index table file to locate individual assets and then use file streams on the blocks to Seek() as needed and then load the bytes to build the assets, but I feel there may be more to it than just that: for example, there is specific folder structure separating the .blk files (folders going 00, 01, 02 etc instead of just putting all the blocks together and whatnot).

What is the typical way of authoring and implementing dynamic assets via blocks, in Unity? Are there guides/resources about this approach?

• I suspect it would be difficult to beat the performance of addressables. Feb 11 at 6:05
• AssetBundles are effectively blocks — groups of related assets packed together with manifest information to help locate specific needed assets within the collection. What specifically is it that you want to do, that you have not found a way to do with the Addressables or AssetBundles that you've mentioned? Feb 11 at 10:26
• @DMGregory the issue I run with AssetBundles for this kind of "dynamic" game is that some scenarios involving plenty of "variety" will cause lots of IO operations opening/closing the individual bundles (and I can't just bundle many assets into one bundle since there's no way of knowing beforehand if they will really appear together etc). That IO burden is noticeable on some platforms, and I had discarded Addressables because from my understanding they're just AssetBundles as well. Genshin using blocks made me think that it was a good way to tackle the dynamic nature of the game. Feb 11 at 23:08
• Can you elaborate on what you think the difference is and why blocks would be better? Both blocks and asset bundles are systems of packing together asset into logical cluster files that can be dynamically loaded and the individual assets peeled out. Why would calling the cluster file a "block" result in less file I/O than calling it a "bundle"? Feb 11 at 23:12