Give Page Feedback | API

Addressable System - Fail-Safe Asset Chunks

Fail-Safe Asset Chunks serve as backups, filling in for original asset chunks when those asset chunks cannot be loaded, usually as a result of a download error.

Alt LOD Fail-Safe

This option is only available to LOD Groups on Streamable Grids that utilize multiple Levels of Detail. With this fail-safe method, whenever an Asset Chunk cannot be downloaded (after Max Load Attempts is reached and the error causing the failed download cannot be repaired), the lowest quality LOD Asset Chunk matching the original Asset Chunk is downloaded instead, and then attached to the World Cell that requested the original Asset Chunk.

Of course, if the original Asset Chunk was from the lowest quality LOD already, this method will not be attempted for that Asset Chunk, since it's assumed the download would fail as well.

In order for this method to work, the lowest quality LOD Group must be using an Addressable Chunk Streamer that is compatible with the Addressable Chunk Streamer used by the LOD Group of the original asset chunk that failed to download. For instance, you cannot load a fail-safe scene asset when the original failed asset was a prefab.

Placeholder Fail-Safe

The Placeholder Fail-Safe Asset is just what the name implies, a simple asset that can replace any failed Asset Chunk from a particular LOD Group.

When a Placeholder Asset is needed, the Streamer builds the Placeholder Asset's name from the LOD Group's Group Name (i.e., the asset should be named GroupName_Placeholder). This allows each LOD Group to have a unique placeholder asset rather than using a generic placeholder asset for all LOD Groups.

The placeholder asset must be in the same form as the other assets from the LOD Group (prefab, scene, etc.) so that the Streamer in use by the LOD Group is able to load it.

Do note, the Placeholder asset will not look very nice, since it will be used with all Streamable Grid Cells. As such, it is always better to use an Alt LOD Fail-Safe Asset Chunk when possible.

Combining Fail-Safe Assets

You do not need to choose one Fail-Safe method or the other. You can use both of them together! When using both, the Streamer will first attempt to load the Alt LOD Fail-Safe Asset Chunk, since this asset should represent the original Asset Chunk more closely. If that Asset Chunk also fails to download, the Placeholder Asset Chunk will be loaded and used instead. If both Fail-Safe Asset Chunks fail to load, the Streamer will throw a MissingAssetException with details about why the last asset that failed to load failed.

Storage Location Of Fail-Safe Assets

In order to reduce the possibility of Fail-Safe Asset Chunks also not downloading properly, it is recommended to place Fail-Safe Assets in separate Addressable Groups that are set to be built locally (to the users device), rather than storing them on some kind of remote server. This should ensure that the Assets can be loaded without issues!

Accounting For Fail-Safe Assets in World Cells

In some cases, World Grouping Listeners, Cell Visual Transition Controllers, and other components that operate on World Cell's will expect and depend on specific Asset Chunks to be loaded for those World Cells. If a Fail-Safe Asset Chunk is loaded instead, it may have a different hierarchy, component-layout, or other settings that the Components accessing the Asset Chunks need to account for.

If you have Components like this, and are using an Addressable Chunk Streamer with Fail-Safe Assets Chunks, you can check to make sure a World Cell is using all original Asset Chunks using the AllChunkAssetsMatchExpectedLOD property (from the WorldCell class). When this property returns false, it means at least one Asset Chunk in the World Cell's Asset Chunk Set is using a Fail-Safe asset.

If your Streamer only uses a single type of fail-safe asset, you should be able to detect which Asset Chunks are fail-safe assets faily easily, and handle those Asset Chunks accordingly. If using both types of Fail-Safe Asset Chunks, it will be a bit more difficult but still should be fairly easy, as you have intimate knowledge of the makeup of your Asset Chunks.