Build Addressable assets
The Addressables content build step converts the assets in your Addressables groups into AssetBundles based on the group settings and the current platform set in the Unity Editor.
You can configure the Addressables system to build your Addressables content as part of every Player build or you can build your content separately before making a Player build. Refer to Building Addressables content with Player builds for more information about configuring these options.
If you configure Unity to build your content as part of the Player build, use the normal Build or Build and Run buttons in the Editor Build Settings window to start a build. Unity builds your Addressables content as a pre-build step before it builds the Player.
In earlier versions of Unity, or if you configure Unity to build your content separately, you must make an Addressables build using the Build menu on the Addressables Groups window. The next time you build the Player for your project, it uses the artifacts produced by the last Addressables content build run for the current platform.
To start a content build from the Addressables Groups window:
- Open the Addressables Groups window (menu: Windows > Asset Management > Addressables > Groups).
- Choose an option from the Build menu:
- New Build: perform a build with a specific build script. Use the Default Build Script if you don't have your own custom one.
- Update a Previous Build: builds an update based on an existing build. To update a previous build, the Addressables system needs the
addressables_content_state.bin
file produced by the earlier build. You can find this file in theAssets/AddressableAssetsData/Platform
folder of your Unity Project. Refer to Content Updates for more information about updating content. - Clean Build: deletes cached build files.
By default, the build creates files in the locations defined in your Profile settings for the LocalBuildPath and RemoteBuildPath variables. The files that Unity uses for your player builds include AssetBundles (.bundle), catalog JSON and hash files, and settings files.
Warning
Don't change the local build or load paths from their default values. If you do, you must copy the local build artifacts from your custom build location to the project's StreamingAssets folder before making a Player build. Altering these paths also precludes building your Addressables as part of the Player build.
If you have groups that you build to the RemoteBuildPath, you must upload those AssetBundles, catalog, and hash files to your hosting server. If your Project doesn't use remote content, set all groups to use the local build and load paths.
A content build also creates the following files that Addressables doesn't use directly in a player build:
addressables_content_state.bin
: used to make a content update build. If you support dynamic content updates, you must save this file after each content release. Otherwise, you can ignore this file.AddressablesBuildTEP.json
: logs build performance data. For more information, refer to Build Profiling.
Refer to Building Addressable content for more information about how to set up and perform a content build.
Start a full content build
To make a full content build:
- Set the desired Platform Target on the Build Settings window.
- Open the Addressables Groups window (menu: Asset Management > Addressables > Groups).
- Choose the New Build > Default Build Script command from the Build menu of the Groups window.
The build process starts.
After the build is complete, you can perform a player build and upload any remote files from your RemoteBuildPath to your hosting server.
Important
If you plan to publish remote content updates without rebuilding your application, you must preserve the addressables_content_state.bin
file for each published build. Without this file, you can only create a full content build and player build, not an update. Refer to Content update builds for more information.