Working with Addressables
Runtime Studio does not depend on Addressables directly. Instead, Addressables are exposed through asset libraries and resolvers.
Core Idea
You connect Addressables to Runtime Studio using:
IRuntimeAssetLibraryIAssetReferenceResolver
This keeps Runtime Studio decoupled from Unity systems.
Creating an Addressables Library
public sealed class AddressablesLibrary :
IRuntimeAssetLibrary
{
public string LibraryId => "addressables";
public string DisplayName => "Addressables";
public IEnumerable<RuntimeAssetLibraryItem> GetItems(Type type)
{
foreach (var asset in MyAddressablesCache.All)
{
if (type == null || type.IsInstanceOfType(asset))
{
yield return new RuntimeAssetLibraryItem(
asset,
asset.name,
asset.name,
"Addressables",
LibraryId,
DisplayName
);
}
}
}
}Register Library
Resolving Saved References
Runtime Studio stores:
asset id
asset name
asset type
To restore:
Stable IDs
Always provide stable IDs:
Last updated