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

    Class BuildScript

    [Obsolete] Entry point into building data for the addressables system. NOTE: This API is going to be replaced soon with a more flexible build system.

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

    Fields

    buildCompleted

    Delegate to be invoked upon build completion.NOTE: This API is going to be replaced soon with a more flexible build system.

    Declaration
    public static Action<AddressableAssetBuildResult> buildCompleted
    Field Value
    Type Description
    System.Action<AddressableAssetBuildResult>

    Methods

    BuildDataForPlayMode(String, ResourceManagerRuntimeData.EditorPlayMode)

    Build runtime data for the specified play mode. NOTE: This API is going to be replaced soon with a more flexible build system.

    Declaration
    public static bool BuildDataForPlayMode(string playerVersion, ResourceManagerRuntimeData.EditorPlayMode mode)
    Parameters
    Type Name Description
    System.String playerVersion

    Player version string.

    ResourceManagerRuntimeData.EditorPlayMode mode

    Editor play mode.

    Returns
    Type Description
    System.Boolean

    True if data is successfully built.

    Cleanup(Boolean)

    Clean up any files created in the streaming assets path or build path such as catalogs and asset bundles.NOTE: This API is going to be replaced soon with a more flexible build system.

    Declaration
    public static void Cleanup(bool deleteStreamingAssetsFolderIfEmpty)
    Parameters
    Type Name Description
    System.Boolean deleteStreamingAssetsFolderIfEmpty

    If true, the streaming assets folder will be deleted if it is empty after removing the files.

    PrepareRuntimeData(Boolean, Boolean, Boolean, Boolean, Boolean, BuildTargetGroup, BuildTarget, String, ResourceManagerRuntimeData.EditorPlayMode, out String)

    [obsolete] Prepare data for runtime. NOTE: This API is going to be replaced soon with a more flexible build system.

    Declaration
    public static bool PrepareRuntimeData(bool isPlayerBuild, bool isDevBuild, bool allowProfilerEvents, bool forceRebuild, bool enteringPlayMode, BuildTargetGroup buildTargetGroup, BuildTarget buildTarget, string playerBuildVersion, ResourceManagerRuntimeData.EditorPlayMode playMode, out string cacheDataPath)
    Parameters
    Type Name Description
    System.Boolean isPlayerBuild

    If building a player, cached addressable data is not used, play mode is forced to Packed, and content update data is generated.

    System.Boolean isDevBuild

    True if the 'Development Build' option is

    System.Boolean allowProfilerEvents

    ResourceManager profiler events will be sent.

    System.Boolean forceRebuild

    If true, cached data is not used.

    System.Boolean enteringPlayMode

    If true and play mode is not Packed, addressable scenes will be added to the BuildPlayer settings scene list temporarily.

    BuildTargetGroup buildTargetGroup

    Target group for build.

    BuildTarget buildTarget

    Build target.

    System.String playerBuildVersion

    Player version. This is stored in the content update data.

    ResourceManagerRuntimeData.EditorPlayMode playMode

    Supported modes are Fast for quick iterate, Virtual for moderate iteration and simulated asset bundle behavior, and Packed for running against built asset bundles. Packed mode is set whenever a player is built as the other modes are not supported in the player.

    System.String cacheDataPath

    Path that content update data was stored. This value is null unless isPlayerBuild is true.

    Returns
    Type Description
    System.Boolean

    True if the build succeeds.

    PrepareRuntimeData(AddressableAssetSettings, Boolean, Boolean, Boolean, Boolean, Boolean, BuildTargetGroup, BuildTarget, String, ResourceManagerRuntimeData.EditorPlayMode, out String)

    [obsolete] Prepare data for runtime. NOTE: This API is going to be replaced soon with a more flexible build system.

    Declaration
    public static bool PrepareRuntimeData(AddressableAssetSettings aaSettings, bool isPlayerBuild, bool isDevBuild, bool allowProfilerEvents, bool forceRebuild, bool enteringPlayMode, BuildTargetGroup buildTargetGroup, BuildTarget buildTarget, string playerBuildVersion, ResourceManagerRuntimeData.EditorPlayMode playMode, out string cacheDataPath)
    Parameters
    Type Name Description
    AddressableAssetSettings aaSettings

    The settings object to use.

    System.Boolean isPlayerBuild

    If building a player, cached addressable data is not used, play mode is forced to Packed, and content update data is generated.

    System.Boolean isDevBuild

    True if the 'Development Build' option is

    System.Boolean allowProfilerEvents

    ResourceManager profiler events will be sent.

    System.Boolean forceRebuild

    If true, cached data is not used.

    System.Boolean enteringPlayMode

    If true and play mode is not Packed, addressable scenes will be added to the BuildPlayer settings scene list temporarily.

    BuildTargetGroup buildTargetGroup

    Target group for build.

    BuildTarget buildTarget

    Build target.

    System.String playerBuildVersion

    Player version. This is stored in the content update data.

    ResourceManagerRuntimeData.EditorPlayMode playMode

    Supported modes are Fast for quick iterate, Virtual for moderate iteration and simulated asset bundle behavior, and Packed for running against built asset bundles. Packed mode is set whenever a player is built as the other modes are not supported in the player.

    System.String cacheDataPath

    Path that content update data was stored. This value is null unless isPlayerBuild is true.

    Returns
    Type Description
    System.Boolean

    True if the build succeeds.

    PurgeCache()

    Purge all cached data for the Addressables system. NOTE: This API is going to be replaced soon with a more flexible build system.

    Declaration
    public static void PurgeCache()
    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