Skip to content

Addressables

The Addressables integration allows to better manage your game's memory footprint and have control over when objects are loaded on memory and when they are released.

About Addressables

This page assumes you are familiar with Unity's Addressables workflow. If not, check the official documentation on Unity Addressables.

Addressables Load from Property

The easiest way to load an object from an Addressable Group is choosing the Addressable option from a property field, and dropping in either the Addressable ID or the Asset Reference object.

When attempting to retrieve this object, the main thread will be blocked until the object is loaded. This option is perfect for small objects that are found inside the executable and do not need to be downloaded through the internet.

Automatic Release

When using addressables via properties, the object loaded is automatically scheduled to be released on the next frame. If you want to keep the object in memory so it can be used without loading it back again, use the Load Addressable instruction.

If you prefer to decide when to load an addressed object and not unload it just afterwards, you can use the instruction Load Addressable Asset.

Addressables Load Asset Instruction

This instruction allows to load an addressable object using three mechanisms:

  • Synchronous: Blocks the main thread and won't resume it until the object is loaded. This should not be used unless the object is very small and is bundled with the executable.
  • Asynchronous Wait: Starts loading the asset in the background, and the instruction waits until it's completed. The next instruction will either have the asset loaded (unless it has failed, and the value is then null).
  • Asynchronous Forget: Starts loading the asset in the background but does not wait until it has been completed. We do not recommend using this method unless you know what you're doing.

Once the asset is loaded it can be instantiated without worrying about bringing it from disk to memory (or server to memory).

To release an asset from memory, use the Release Addressable Asset instruction. This will automatically remove it from memory.

Addressables Release Asset Instruction