docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    object
    ResourceProviderBase
    NativeContentAssetEntryProvider
    NativeContentAssetListProvider
    Implements
    IResourceProvider
    IInitializableObject
    IUpdateReceiver
    Inherited Members
    NativeContentAssetEntryProvider.SceneDependencyResourceType
    NativeContentAssetEntryProvider.Provide(ProvideHandle)
    NativeContentAssetEntryProvider.Release(IResourceLocation, object)
    ResourceProviderBase.m_ProviderId
    ResourceProviderBase.m_BehaviourFlags
    ResourceProviderBase.ProviderId
    ResourceProviderBase.Initialize(string, string)
    ResourceProviderBase.ToString()
    ResourceProviderBase.GetDefaultType(IResourceLocation)
    ResourceProviderBase.CreateCacheKeyForLocation(ResourceManager, IResourceLocation, Type)
    ResourceProviderBase.InitializeAsync(ResourceManager, string, string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)