The Addressable Asset System simplifies how you manage the assets that make up your game. Any asset, including Scenes, Prefabs, text assets, and so on, can be marked as “addressable” and given a unique name. You can call this alias from anywhere.

Adding this extra level of abstraction between the game and its assets can streamline certain tasks, such as creating a separate downloadable content pack. This system also facilitates referencing those asset packs, whether they’re local or remote.

In this example, Addressables track the inventory of Prefabs.

To begin, install the Addressables package from the Package Manager, and add some basic settings to the project. Each asset or Prefab in the project should have the option to be made “addressable.” Check the option under an asset’s name in the Inspector to assign it a default unique address.

Addressable option enabled with default Addressable Name

Once marked, the corresponding assets will appear in the Window > Asset Management > Addressables > Groups window.

In Addressables Groups, you can see each asset’s custom address, paired with its location.

For convenience, you can either rename each address in the asset’s individual Address field, or simplify them all at once.

Simplify the Addressable Names with a single menu action, or rename them individually.

Use the default build script to generate an Addressable Group asset bundle.

Bundle these assets to host them on a server elsewhere, or distribute them locally within your project. Wherever each asset resides, the system can locate them using the Addressable Name string.

You can now use your Addressable assets through the Addressables API.

It’s worth noting that, without Addressables, you’d have to complete the following to instantiate a Prefab in your Scene:

Source: Unity Technologies Blog

0 0 votes
Article Rating