Class ContentUpdateScript | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ContentUpdateScript

    Contains methods used for the content update workflow.

    Inheritance
    System.Object
    ContentUpdateScript
    Namespace: UnityEditor.AddressableAssets.Build
    Syntax
    public static class ContentUpdateScript

    Methods

    BuildContentUpdate(AddressableAssetSettings, String)

    Builds player content using the player content version from a specified cache file.

    Declaration
    public static AddressablesPlayerBuildResult BuildContentUpdate(AddressableAssetSettings settings, string contentStateDataPath)
    Parameters
    Type Name Description
    AddressableAssetSettings settings

    The settings object to use for the build.

    System.String contentStateDataPath

    The path of the cache data to use.

    Returns
    Type Description
    AddressablesPlayerBuildResult

    The build operation.

    CreateContentUpdateGroup(AddressableAssetSettings, List<AddressableAssetEntry>, String)

    Create a new AddressableAssetGroup with the items and mark it as remote.

    Declaration
    public static void CreateContentUpdateGroup(AddressableAssetSettings settings, List<AddressableAssetEntry> items, string groupName)
    Parameters
    Type Name Description
    AddressableAssetSettings settings

    The settings object.

    System.Collections.Generic.List<AddressableAssetEntry> items

    The items to move.

    System.String groupName

    The name of the new group.

    GetContentStateDataPath(Boolean)

    Gets the path of the cache data from a selected build.

    Declaration
    public static string GetContentStateDataPath(bool browse)
    Parameters
    Type Name Description
    System.Boolean browse

    If true, the user is allowed to browse for a specific file.

    Returns
    Type Description
    System.String

    SaveContentState(String, List<AddressableAssetEntry>, IDependencyData, String, String)

    Save the content update information for a set of AddressableAssetEntry objects.

    Declaration
    public static bool SaveContentState(string path, List<AddressableAssetEntry> entries, IDependencyData dependencyData, string playerVersion, string remoteCatalogPath)
    Parameters
    Type Name Description
    System.String path

    File to write content stat info to. If file already exists, it will be deleted before the new file is created.

    System.Collections.Generic.List<AddressableAssetEntry> entries

    The entries to save.

    IDependencyData dependencyData

    The raw dependency information generated from the build.

    System.String playerVersion

    The player version to save. This is usually set to AddressableAssetSettings.PlayerBuildVersion.

    System.String remoteCatalogPath

    The server path (if any) that contains an updateable content catalog. If this is empty, updates cannot occur.

    Returns
    Type Description
    System.Boolean

    True if the file is saved, false otherwise.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023