Create a content-only build
To create a content-only build, you need to use the Addressables Groups window, which allows you to run a build script to create a build that only contains the Addressables assets in your project. You can also use the Addressables Groups window to run your own custom build scripts.
To create a content-only build:
- Configure your project's group settings.
- Optionally, set up a remote build if you're distributing the content on a remote server.
- Launch the content build from the Groups window.
Tip
If you encounter build or runtime loading issues during development, in the Groups Window run the Clear Build Cache > All command from the Build menu before you rebuild your content.
Set up remote content builds
To set up a remote content build:
- Open the Addressable Asset Settings asset (menu: Window > Asset Management > Addressables > Settings).
- In the Catalog section, enable the Build Remote Catalog setting. The BuildPath and LoadPath settings for the catalog must be the same as those you use for remote groups. You can usually use the RemoteBuildPath and RemoteLoadPath profile variables.
- For each group that you want to build as remote content, set the BuildPath and LoadPath to the RemoteBuildPath and RemoteLoadPath profile variables (or a custom value if desired).
- Open the Profiles window (menu: Window > Asset Management > Addressables > Profiles).
- Set the RemoteLoadPath variable to the URL where you plan to host your remote content. If you require different URLs for different types of builds, create a new Profile for each build type. For more information, refer to Create a profile.
For information on distributing remote content, refer to Distribute remote content.
Create a content build
After you have group and Addressables system settings configured, you can run a content build:
- Open the Addressables Groups window (menu: Windows > Asset Management > Addressables > Groups).
- Select the desired profile from the Profile menu on the toolbar.
- Select Build > New Build > Default Build Script. If you have created your own build scripts they are also available from this menu.
The Default Build Script creates one or more AssetBundles for each group and saves them to either the local or the remote build path. 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.
If you've already created a build, the Update a Previous Build option is also available, and you can use it to create an update build.
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.
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.
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.
After the build is complete, you can perform a Player build and upload any remote files from your RemoteBuildPath to your hosting server.