Class ResourceProviderBase
Base class for IResourceProvider.
Inherited Members
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
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
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
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
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 |
Object | obj | The object to release. |
Implements
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Explicit Interface Implementations
IResourceProvider.BehaviourFlags
Declaration
ProviderBehaviourFlags IResourceProvider.BehaviourFlags { get; }
Returns
Type | Description |
---|---|
ProviderBehaviourFlags |