Class RawDataProvider | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class RawDataProvider

    Provides raw text from a local or remote URL.

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

    Properties

    IgnoreFailures

    Controls whether errors are logged - this is disabled when trying to load from the local cache since failures are expected

    Declaration
    public bool IgnoreFailures { get; set; }
    Property Value
    Type Description
    System.Boolean

    LoadAsText

    If true, the data is loaded as text for the handler

    Declaration
    public virtual bool LoadAsText { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Convert<TObject>(String)

    Method to convert the text into the object type requested. Usually the text contains a JSON formatted serialized object.

    Declaration
    public abstract TObject Convert<TObject>(string text)
        where TObject : class
    Parameters
    Type Name Description
    System.String text

    The text to be converted.

    Returns
    Type Description
    TObject

    The converted object.

    Type Parameters
    Name Description
    TObject

    The object type to convert the text to.

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

    Provides raw text data from the location.

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

    Location of the data to load.

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

    Operation to load the raw data.

    Type Parameters
    Name Description
    TObject

    Object type.

    Overrides
    ResourceProviderBase.Provide<TObject>(IResourceLocation, IList<Object>)
    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