Class NativeContentAssetListProvider
Specialized provider for bare-key IList<T> requests on multi-sub-asset
entries (e.g. a Texture2D with multiple Sprites). Inherits all list-loading logic
from NativeContentAssetEntryProvider but restricts
CanProvide(Type, IResourceLocation) to generic IList<> requests.
This distinct provider type is necessary to avoid a conflict with
DynamicResourceLocator: when a bare-key Sprite-typed location exists,
DynamicResourceLocator intercepts sub-key single-sprite loads and synthesises
a child location carrying the parent's ContentDirectoryAssetData (including
SubAssetIds). By giving the list location a different ProviderId,
CanProvide(Sprite, …) returns false for the child location, the
ResourceManager provider lookup returns null, and the outer locator
loop falls through to the catalog's direct sub-key entry — ensuring the correct
per-sprite AssetId is used.
A CanProvide override on NativeContentAssetEntryProvider itself
would be unsafe: ResourceManager.GetResourceProvider caches results by
(ProviderId, requestedType) only, so a location-sensitive override would be
memoized incorrectly across calls sharing the same provider id.
Inheritance
Inherited Members
Namespace: UnityEngine.AddressableAssets.ResourceProviders
Assembly: Unity.Addressables.dll
Syntax
public class NativeContentAssetListProvider : NativeContentAssetEntryProvider, IResourceProvider, IInitializableObject, IUpdateReceiver
Methods
| Name | Description |
|---|---|
| CanProvide(Type, IResourceLocation) | Determine if this provider can provide the specified object type from the specified location. |