Struct ContentRootAsset.Entry
One named asset. The key is the runtime contract; the Loadable is the build-time edge.
[Serializable]
public struct ContentRootAsset.Entry
- Inherited Members
Fields
- asset
The asset itself, included in the build because it is reachable from a Loadable.
- assetPath
The asset this entry points at, as a project path, so the entry can be marked in the editor by dragging the asset in rather than by hand-writing a JSON or a GUID.
A path is not a reference on purpose. A direct
Objectfield would make the asset reachable from the root by reference — and then Unity pulls it in on registration, always resident, which is exactly what Unity.Loading.Loadable<T> exists to avoid. The path is authoring data; the Loadable below is the built edge, derived from it.
- key
Runtime key, e.g.
Assets/_GrindFest/Prefabs/Items/Fish.prefabormod/<mod>/prefab/x.
- labels
The content labels this asset carries: what it is (
item,monster,story, …) and the tier it is loaded in.This is the last piece of the declaration that used to live outside the repo. The manifest needs it — tiers drive preloading, labels drive the manifest queries, and a label is what makes a whole kind answerable at all — and
ContentScannertook it from the Addressables labels on each entry. That is why "mark it as Addressable" was still the way to declare content, and why the roots could not be the declaration until this field existed. Everything else the manifest needs is derivable: the key and the path are here, the name and the type come from the path, the group is the root's directoryName, and the references come from the AssetDatabase's dependency graph.Null means "no labels", not an error: this field was added after these roots were first generated, so an entry deserialized from an older asset has none. A struct cannot initialise it here — C# 9 refuses field initialisers in a struct — and making Entry a class would change how the committed roots serialize, which is a data migration this change does not need.