Class BuildStep | Entities | 0.2.0-preview.18
docs.unity3d.com
    Show / Hide Table of Contents

    Class BuildStep

    Base class for build steps that are executed througout a BuildPipeline.

    Inheritance
    Object
    BuildStep
    BuildStepApplyPlayerSettings
    BuildStepBuildClassicLiveLink
    Namespace: Unity.Build
    Syntax
    public abstract class BuildStep : IBuildStep

    Properties

    Description

    Description of this BuildStep displayed in build progress reporting.

    Declaration
    public abstract string Description { get; }
    Property Value
    Type Description
    String
    Implements
    IBuildStep.Description

    OptionalComponents

    List of IBuildSettingsComponent derived types that are optional for this BuildStep.

    Declaration
    public virtual Type[] OptionalComponents { get; }
    Property Value
    Type Description
    Type[]
    Implements
    IBuildStep.OptionalComponents

    RequiredComponents

    List of IBuildSettingsComponent derived types that are required for this BuildStep.

    Declaration
    public virtual Type[] RequiredComponents { get; }
    Property Value
    Type Description
    Type[]
    Implements
    IBuildStep.RequiredComponents

    Methods

    CleanupBuildStep(BuildContext)

    Cleanup this BuildStep. Cleanup will only be called if this BuildStep ran.

    Declaration
    public virtual BuildStepResult CleanupBuildStep(BuildContext context)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    BuildStepResult
    Implements
    IBuildStep.CleanupBuildStep(BuildContext)

    Failure(String)

    Construct BuildStepResult from this IBuildStep that represent a failed execution.

    Declaration
    public BuildStepResult Failure(string message)
    Parameters
    Type Name Description
    String message

    Message that explain why the IBuildStep execution failed.

    Returns
    Type Description
    BuildStepResult

    A new BuildStepResult instance.

    GetAvailableTypes(Func<Type, Boolean>)

    Retrieves a list of valid types for build steps.

    Declaration
    public static IReadOnlyCollection<Type> GetAvailableTypes(Func<Type, bool> filter = null)
    Parameters
    Type Name Description
    Func<Type, Boolean> filter

    Optional filter function for types.

    Returns
    Type Description
    IReadOnlyCollection<Type>

    List of available build step types.

    GetOptionalComponent(BuildContext, Type)

    Get the value of an optional Type component from BuildSettings. The component Type must exist in the OptionalComponents list. If the component is not found in BuildSettings, a new instance of type Type is returned.

    Declaration
    public IBuildSettingsComponent GetOptionalComponent(BuildContext context, Type type)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Type type

    Type of the optional component.

    Returns
    Type Description
    IBuildSettingsComponent

    The value of the optional component.

    GetOptionalComponent<T>(BuildContext)

    Get the value of an optional T component from BuildSettings. The component Type must exist in the OptionalComponents list. If the component is not found in BuildSettings, a new instance of type T is returned.

    Declaration
    public T GetOptionalComponent<T>(BuildContext context)
        where T : IBuildSettingsComponent
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    T

    The value of the optional component.

    Type Parameters
    Name Description
    T

    Type of the optional component.

    GetRequiredComponent(BuildContext, Type)

    Get the value of a required Type component from BuildSettings. The component Type must exist in the RequiredComponents list.

    Declaration
    public IBuildSettingsComponent GetRequiredComponent(BuildContext context, Type type)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Type type

    Type of the required component.

    Returns
    Type Description
    IBuildSettingsComponent

    The value of the required component.

    GetRequiredComponent<T>(BuildContext)

    Get the value of a required T component from BuildSettings. The component Type must exist in the RequiredComponents list.

    Declaration
    public T GetRequiredComponent<T>(BuildContext context)
        where T : IBuildSettingsComponent
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    T

    The value of the required component.

    Type Parameters
    Name Description
    T

    Type of the required component.

    HasOptionalComponent(BuildContext, Type)

    Determine if an optional Type component is stored in BuildSettings. The component Type must exist in the OptionalComponents list.

    Declaration
    public bool HasOptionalComponent(BuildContext context, Type type)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Type type

    Type of the optional component.

    Returns
    Type Description
    Boolean

    true if the optional component type is found, false otherwise.

    HasOptionalComponent<T>(BuildContext)

    Determine if an optional T component is stored in BuildSettings. The component Type must exist in the OptionalComponents list.

    Declaration
    public bool HasOptionalComponent<T>(BuildContext context)
        where T : IBuildSettingsComponent
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    Boolean

    true if the optional component type is found, false otherwise.

    Type Parameters
    Name Description
    T

    Type of the optional component.

    HasRequiredComponent(BuildContext, Type)

    Determine if a required Type component is stored in BuildSettings. The component Type must exist in the RequiredComponents list.

    Declaration
    public bool HasRequiredComponent(BuildContext context, Type type)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Type type

    Type of the required component.

    Returns
    Type Description
    Boolean

    true if the required component type is found, false otherwise.

    HasRequiredComponent<T>(BuildContext)

    Determine if a required T component is stored in BuildSettings. The component Type must exist in the RequiredComponents list.

    Declaration
    public bool HasRequiredComponent<T>(BuildContext context)
        where T : IBuildSettingsComponent
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    Boolean

    true if the required component type is found, false otherwise.

    Type Parameters
    Name Description
    T

    Type of the required component.

    IsEnabled(BuildContext)

    Determine if this BuildStep will be executed or not.

    Declaration
    public virtual bool IsEnabled(BuildContext context)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    Boolean

    true if enabled, false otherwise.

    Implements
    IBuildStep.IsEnabled(BuildContext)

    RunBuildStep(BuildContext)

    Run this BuildStep. If a previous BuildStep fails, this BuildStep will not run.

    Declaration
    public abstract BuildStepResult RunBuildStep(BuildContext context)
    Parameters
    Type Name Description
    BuildContext context

    The BuildContext used by the execution of this BuildStep.

    Returns
    Type Description
    BuildStepResult

    The result of running this BuildStep.

    Implements
    IBuildStep.RunBuildStep(BuildContext)

    Success()

    Construct BuildStepResult from this IBuildStep that represent a successful execution.

    Declaration
    public BuildStepResult Success()
    Returns
    Type Description
    BuildStepResult

    A new BuildStepResult instance.

    Extension Methods

    BuildStepExtensions.GetOutputBuildDirectory(BuildStep, BuildContext)
    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