Class ResourceLocationBase
Basic implementation of IResourceLocation
Inheritance
Namespace: UnityEngine.ResourceManagement.ResourceLocations
Syntax
public class ResourceLocationBase : IResourceLocation
Constructors
ResourceLocationBase(String, String, String, IResourceLocation[])
Construct a new ResourceLocationBase.
Declaration
public ResourceLocationBase(string name, string id, string providerId, params IResourceLocation[] dependencies)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the location. This is usually set to the primary key, or "address" of the location. |
System.String | id | The internal id of the location. This is used by the IResourceProvider to identify the object to provide. For example this may contain the file path or url of an asset. |
System.String | providerId | The provider id. This is set to the FullName of the type of the provder class. |
IResourceLocation[] | dependencies | Locations for the dependencies of this location. |
Properties
Data
Data that is intended for the provider. Objects can be serialized during the build process to be used by the provider. An example of usage is cache usage data for AssetBundleProvider.
Declaration
public object Data { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Implements
Dependencies
List of dependencies that must be loaded before this location. This value may be null.
Declaration
public IList<IResourceLocation> Dependencies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<IResourceLocation> |
Implements
HasDependencies
Convenience method to see if there are any dependencies.
Declaration
public bool HasDependencies { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
InternalId
Internal id.
Declaration
public string InternalId { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
ProviderId
Provider Id. This is usually set to the FullName property of the type of the provider class.
Declaration
public string ProviderId { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Methods
ToString()
Returns the name of the location. This is usally set to the primary key of the location, or its "address".
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |