Limitations
While the Spatial Creator Toolkit tries to integrate Addressables as natively as possible, there are some limitations that exist to ensure everything runs smoothly in Spatial.
If there's a feature with Addressables that is not supported in Spatial, and you strongly believe that it should be, please reach out and send a feature request!
Space Packages Only
Since C# scripting is only supported for Space package types and Addressables API is only accessible through C#, they will be the only package type that supports Addressables.
No Scene Assets
Direct access to scene loading and unloading via the Addressables API is restricted in order to be compatible with internal systems in Spatial. We will introduce multi-scene workflows and loading in the near future.
Some Settings Are Enforced
At build time, we overwrite many values under the default settings asset, as well as some values stored in Asset Group(s) schemas. This is to ensure they are configured correctly for Spatial. Below are tables of overridden config values, and some additional context for why it's enforced.
Project-wide Config (Sandbox only)
Name | Enforced Value | Additional Notes |
---|---|---|
MonoScript Bundle Naming Prefix | Default Group GUID | For C# scripts attached to Addressable assets to work |
Shader Bundle Naming Prefix | Default Group GUID | Prevent shaders from conflicting with internal shader types |
Non-Recursive Dependency Calculation | true | Helps with build times and runtime memory usage |
Send Profiler Events | false | Profiling is disabled |
Log Runtime Exceptions | true | Assists with debugging |
Build Path | Library/AssetBundles/Sandbox | Build location cannot be modified |
Build Remote Catalog | true | Spatial only supports remote catalogs |
Note
The project wide settings (AddressableAssetSettings
) only affects the Spatial Sandbox build. When publishing a package, this settings asset is excluded from the export entirely and any modifications to the settings will have no effect in your space.
Bundled Asset Group Config
Name | Enforced Value | Notes |
---|---|---|
Bundle Naming | Append Hash | Avoids naming conflicts with other bundles |
Asset Bundle Compression (Web) | LZ4 | LZMA is unsupported on WebGL, so LZ4 is the next best option |
Asset Bundle Compression (non-Web) | LZMA | LZMA gives favorable compression ratio to LZ4 |
Use Asset Bundle Cache | true | Caching speeds up loading time |
Use CRC | Enabled, Excluding Cached | Disabled completely when publishing since it's incompatible with a custom compression algorithm |
Banned C# API
The Spatial client also uses Addressables to load internal assets, so usage of some of these APIs can interfere with the app. Almost all API outside of the Addressables
static class and AsyncOperationHandle
struct are not allowed, with very few exceptions. Attempting to use these APIs will result in compilation errors and publishing failures.
Some examples of banned API:
- Some obsolete functions, like
AssetReference.LoadAsset
- The entire
UnityEngine.ResourceManagement.Diagnostics
namespace - The entire
UnityEngine.ResourceManagement.ResourceProviders
namespace
Single Content Catalog
There can only be one content catalog associated with your space. Loading additional catalogs at runtime is not supported.
No Custom Build Scripts
For simplicity and security reasons, custom build scripts and schemas are not allowed. Spatial only supports the BundledAssetGroupSchema
type in Asset Groups. Any other schema/group type will be ignored.