Class ResourceLocationBase | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class ResourceLocationBase

    Basic implementation of IResourceLocation

    Inheritance
    System.Object
    ResourceLocationBase
    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
    IResourceLocation.Data

    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
    IResourceLocation.Dependencies

    HasDependencies

    Convenience method to see if there are any dependencies.

    Declaration
    public bool HasDependencies { get; }
    Property Value
    Type Description
    System.Boolean
    Implements
    IResourceLocation.HasDependencies

    InternalId

    Internal id.

    Declaration
    public string InternalId { get; }
    Property Value
    Type Description
    System.String
    Implements
    IResourceLocation.InternalId

    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
    IResourceLocation.ProviderId

    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
    Overrides
    System.Object.ToString()
    Back to top Copyright © 2015-2018 Unity
    Generated by DocFX