Class ResourceProviderBase | Addressables | 1.13.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class ResourceProviderBase

    Base class for IResourceProvider.

    Inheritance
    Object
    ResourceProviderBase
    ContentCatalogProvider
    AssetBundleProvider
    AtlasSpriteProvider
    BundledAssetProvider
    LegacyResourcesProvider
    TextDataProvider
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.ResourceManagement.ResourceProviders
    Syntax
    public abstract class ResourceProviderBase : IResourceProvider, IInitializableObject

    Fields

    m_BehaviourFlags

    Declaration
    protected ProviderBehaviourFlags m_BehaviourFlags
    Field Value
    Type Description
    ProviderBehaviourFlags

    m_ProviderId

    Declaration
    protected string m_ProviderId
    Field Value
    Type Description
    String

    Properties

    ProviderId

    Unique identifier for this provider, used by Resource Locations to find a suitable Provider

    Declaration
    public virtual string ProviderId { get; }
    Property Value
    Type Description
    String

    The provider identifier.

    Implements
    IResourceProvider.ProviderId

    Methods

    CanProvide(Type, IResourceLocation)

    Determine if this provider can provide the specified object type from the specified location.

    Declaration
    public virtual bool CanProvide(Type t, IResourceLocation location)
    Parameters
    Type Name Description
    Type t
    IResourceLocation location

    The resource location of the object.

    Returns
    Type Description
    Boolean

    True if this provider can create the specified object.

    Implements
    IResourceProvider.CanProvide(Type, IResourceLocation)

    GetDefaultType(IResourceLocation)

    Get the default type of object that this provider can provide.

    Declaration
    public virtual Type GetDefaultType(IResourceLocation location)
    Parameters
    Type Name Description
    IResourceLocation location
    Returns
    Type Description
    Type
    Implements
    IResourceProvider.GetDefaultType(IResourceLocation)

    Initialize(String, String)

    Initialize a constructed object.

    Declaration
    public virtual bool Initialize(string id, string data)
    Parameters
    Type Name Description
    String id

    The id of the object.

    String data

    Serialized data for the object.

    Returns
    Type Description
    Boolean

    The result of the initialization.

    Implements
    IInitializableObject.Initialize(String, String)

    InitializeAsync(ResourceManager, String, String)

    Async operation for initializing a constructed object.

    Declaration
    public virtual AsyncOperationHandle<bool> InitializeAsync(ResourceManager rm, string id, string data)
    Parameters
    Type Name Description
    ResourceManager rm

    The current instance of Resource Manager.

    String id

    The id of the object.

    String data

    Serialized data for the object.

    Returns
    Type Description
    AsyncOperationHandle<Boolean>

    Async operation

    Implements
    IInitializableObject.InitializeAsync(ResourceManager, String, String)

    Provide(ProvideHandle)

    Provide the object specified in the provideHandle.

    Declaration
    public abstract void Provide(ProvideHandle provideHandle)
    Parameters
    Type Name Description
    ProvideHandle provideHandle

    Contains all data needed to provide the requested object.

    Implements
    IResourceProvider.Provide(ProvideHandle)

    Release(IResourceLocation, Object)

    Release the specified object that was created from the specified location.

    Declaration
    public virtual void Release(IResourceLocation location, object obj)
    Parameters
    Type Name Description
    IResourceLocation location

    The location of the object

    Object obj

    The object to release.

    Implements
    IResourceProvider.Release(IResourceLocation, Object)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    Explicit Interface Implementations

    IResourceProvider.BehaviourFlags

    Declaration
    ProviderBehaviourFlags IResourceProvider.BehaviourFlags { get; }
    Returns
    Type Description
    ProviderBehaviourFlags
    Implements
    IResourceProvider.BehaviourFlags
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023