Build Process
Asset Scope / Sharing
Since Addressables settings and groups are shared across the entire Unity project, all Space packages published through the Unity project will share the same Addressable assets and locations. This allows you to reuse the same Addressable in any of your other published spaces, which will utilize the asset bundle cache more effectively.
Pre-Build Checklist
The Creator Toolkit runs through a checklist to determine whether Addressables should be built and uploaded to the sandbox, or included in the published package. The rough process is as follows:
- Is Addressables data initialized?
- The
AddressableAssetsData
directory and theAssetGroups
sub-directory must exist - The default settings object must exist (typically
AddressableAssetsData/AddressableAssetSettings.asset
)
- The
- Does the package support Addressables?
- The package must be a Space and a C# assembly must be assigned in the package config
- Is there any Addressable content to build?
- At least one group must satisfy the following conditions:
- Must have
BundledAssetGroupSchema
type Include in Build
is enabled- Contains at least one asset entry
- Must have
- At least one group must satisfy the following conditions:
If any of the steps above fails, then Addressables build will be skipped and files will not be uploaded. Any attempts to load these Addressables in your C# script(s) will also fail.
Sandbox Behavior
The asset bundles are built locally for WebGL and uploaded to your Spatial Sandbox. The project-wide configuration asset (AddressableAssetSettings
) has an effect on these bundles, but some settings may be enforced.
Publishing Behavior
The project-wide configuration asset (AddressableAssetSettings
) is not included in the package when uploading to Spatial. This means that any changes made in the config asset will have no effect.