docs.unity.cn
    Show / Hide Table of Contents

    Class FileRegistry

    Use to contain files created during a build.

    Inheritance
    Object
    FileRegistry
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.AddressableAssets.Build
    Syntax
    public class FileRegistry

    Constructors

    FileRegistry()

    Initializes a new file registry instance.

    Declaration
    public FileRegistry()

    Methods

    AddFile(String)

    Adds a file path to our set of file paths.

    Declaration
    public void AddFile(string path)
    Parameters
    Type Name Description
    String path

    The file path.

    GetFilePathForBundle(String)

    Given a bundle name, determine the file path for the bundle.

    Declaration
    public string GetFilePathForBundle(string bundleName)
    Parameters
    Type Name Description
    String bundleName

    The name of the bundle.

    Returns
    Type Description
    String

    The full file path.

    GetFilePaths()

    Retrieves all the stored file paths.

    Declaration
    public IEnumerable<string> GetFilePaths()
    Returns
    Type Description
    IEnumerable<String>

    Returns all file paths as an IEnumerable.

    RemoveFile(String)

    Removes a file path from our set of file paths.

    Declaration
    public void RemoveFile(string path)
    Parameters
    Type Name Description
    String path

    The file path.

    ReplaceBundleEntry(String, String)

    Replace an entry in the File Registry with a new bundle name.

    Declaration
    public bool ReplaceBundleEntry(string bundleName, string newFileRegistryEntry)
    Parameters
    Type Name Description
    String bundleName

    The bundle name to replace.

    String newFileRegistryEntry

    The new file registry bundle name.

    Returns
    Type Description
    Boolean

    Returns true if a successful replacement occured.

    Back to top Copyright © 2021 Unity Technologies
    Generated by DocFX
    on 04 November 2021
    Terms of use