Class RawDataProvider
Provides raw text from a local or remote URL.
Inherited Members
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. |