Class ResourceProviderBase
Base class for IResourceProvider.
Inheritance
System.Object
ResourceProviderBase
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 | 
|---|---|
| System.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 | 
|---|---|
| System.String | The provider identifier.  | 
Implements
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 | 
|---|---|---|
| System.Type | t | |
| IResourceLocation | location | The resource location of the object.  | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if this provider can create the specified object.  | 
Implements
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 | 
|---|---|
| System.Type | 
Implements
Initialize(String, String)
Initialize a constructed object.
Declaration
public virtual bool Initialize(string id, string data)
Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | The id of the object.  | 
| System.String | data | Serialized data for the object.  | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | The result of the initialization.  | 
Implements
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
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  | 
| System.Object | obj | The object to release.  | 
Implements
ToString()
Declaration
public override string ToString()
Returns
| Type | Description | 
|---|---|
| System.String | 
Overrides
System.Object.ToString()
Explicit Interface Implementations
IResourceProvider.BehaviourFlags
Declaration
ProviderBehaviourFlags IResourceProvider.BehaviourFlags { get; }
Returns
| Type | Description | 
|---|---|
| ProviderBehaviourFlags |