Class AssetBundleProviderRemoteWebRequest | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class AssetBundleProviderRemoteWebRequest

    Loads an asset bundle via the AssetBundle.LoadFromStreamAsync API. The bundle is downloaded via WebRequest as a byte array and bypasses the normal asset bundle loading code. This is provided as an example to extend to support cases such as using the .NET HttpClient API or injecting a decryption layer into loading bundles.

    Inheritance
    System.Object
    ResourceProviderBase
    AssetBundleProviderRemoteWebRequest
    Inherited Members
    ResourceProviderBase.m_ProviderId
    ResourceProviderBase.m_BehaviourFlags
    ResourceProviderBase.ProviderId
    ResourceProviderBase.Initialize(String, String)
    ResourceProviderBase.CanProvide<TObject>(IResourceLocation)
    ResourceProviderBase.ToString()
    ResourceProviderBase.IResourceProvider.BehaviourFlags
    Namespace: UnityEngine.ResourceManagement.ResourceProviders.Experimental
    Syntax
    public class AssetBundleProviderRemoteWebRequest : ResourceProviderBase, IResourceProvider, IInitializableObject

    Methods

    Provide<TObject>(IResourceLocation, IList<Object>)

    Synchronously load the resource at the given location. An asynchronous load operation for any dependencies should be passed as an argument.

    Declaration
    public override IAsyncOperation<TObject> Provide<TObject>(IResourceLocation location, IList<object> deps)
        where TObject : class
    Parameters
    Type Name Description
    IResourceLocation location

    Location to load.

    System.Collections.Generic.IList<System.Object> deps
    Returns
    Type Description
    IAsyncOperation<TObject>

    An asynchronous operation to load the object.

    Type Parameters
    Name Description
    TObject

    Object type to be loaded and returned.

    Overrides
    ResourceProviderBase.Provide<TObject>(IResourceLocation, IList<Object>)

    Release(IResourceLocation, Object)

    Declaration
    public override bool Release(IResourceLocation location, object asset)
    Parameters
    Type Name Description
    IResourceLocation location
    System.Object asset
    Returns
    Type Description
    System.Boolean
    Overrides
    ResourceProviderBase.Release(IResourceLocation, Object)
    Back to top Copyright © 2015-2018 Unity
    Generated by DocFX