Class BuildPipelineBase
Namespace: Unity.Build
Syntax
public abstract class BuildPipelineBase
Constructors
BuildPipelineBase()
Default constructor.
Declaration
public BuildPipelineBase()
BuildPipelineBase(BuildStepCollection)
Construct build pipeline from build step collection.
Declaration
public BuildPipelineBase(BuildStepCollection steps)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildStepCollection | steps | List of build steps. |
Properties
BuildSteps
Optional list of build steps used by this build pipeline.
Declaration
public virtual BuildStepCollection BuildSteps { get; }
Property Value
| Type | Description |
|---|---|
| BuildStepCollection |
UsedComponents
List of build component types used by this build pipeline.
Declaration
public virtual Type[] UsedComponents { get; }
Property Value
| Type | Description |
|---|---|
| Type[] |
Methods
Build(BuildConfiguration, BuildProgress)
Build this build pipeline using the specified build configuration.
Declaration
public BuildResult Build(BuildConfiguration config, BuildProgress progress = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration to be used by this build pipeline. |
| BuildProgress | progress | Optional build progress report. |
Returns
| Type | Description |
|---|---|
| BuildResult | A result describing if build is successful or not. |
BuildIncremental(BuildConfiguration, BuildProgress)
Start an incremental build of this build pipeline using the specified build configuration. The Update() method needs to be called until it returns false, indicating that the build has completed. The BuildResult can then be queried from the Result property.
Declaration
public BuildProcess BuildIncremental(BuildConfiguration config, BuildProgress progress = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration to be used by this build pipeline. |
| BuildProgress | progress | Optional build progress report. |
Returns
| Type | Description |
|---|---|
| BuildProcess | The build process. |
CanBuild(BuildConfiguration)
Determine if the build pipeline satisfy requirements to build.
Declaration
public ResultBase CanBuild(BuildConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration to be used by this build pipeline. |
Returns
| Type | Description |
|---|---|
| ResultBase | A result describing if the pipeline can build or not. |
CanPrepare(BuildConfiguration)
Determine if the environment can be prepared before the build pipeline can be used.
Declaration
public ResultBase CanPrepare(BuildConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration. |
Returns
| Type | Description |
|---|---|
| ResultBase | A result indicating if the environment can be prepared. |
CanRun(BuildConfiguration, RunTargetBase[])
Determine if the build pipeline satisfy requirements to run the last build.
Declaration
public ResultBase CanRun(BuildConfiguration config, params RunTargetBase[] runTargets)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration corresponding to the build to be run. |
| RunTargetBase[] | runTargets | List of devices to deploy and run on. |
Returns
| Type | Description |
|---|---|
| ResultBase | A result describing if the pipeline can run or not. |
Clean(BuildConfiguration)
Clean the build result from building the build pipeline of this build configuration.
Declaration
public CleanResult Clean(BuildConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration that was used to build this build pipeline. |
Returns
| Type | Description |
|---|---|
| CleanResult |
GetOutputBuildDirectory(BuildConfiguration)
Directory containing final build files.
Declaration
public virtual DirectoryInfo GetOutputBuildDirectory(BuildConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration containing the information . |
Returns
| Type | Description |
|---|---|
| DirectoryInfo | Returns the directory path. |
IsComponentUsed(Type)
Determine if component is used by the build pipeline. Returns false if this build configuration does not have a build pipeline.
Declaration
public bool IsComponentUsed(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The component type. |
Returns
| Type | Description |
|---|---|
| Boolean | true if the component is used by the build pipeline, false otherwise. |
IsComponentUsed<T>()
Determine if component is used by the build pipeline. Returns false if this build configuration does not have a build pipeline.
Declaration
public bool IsComponentUsed<T>()
where T : IBuildComponent
Returns
| Type | Description |
|---|---|
| Boolean | true if the component is used by the build pipeline, false otherwise. |
Type Parameters
| Name | Description |
|---|---|
| T | The component type. |
OnBuild(BuildContext)
Provides implementation to build this build pipeline using the specified build configuration. When using BuildIncremental(BuildConfiguration, BuildProgress), this method is called repeatedly until a build result is returned.
Declaration
protected abstract BuildResult OnBuild(BuildContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildContext | context | The build context for the scope of the build operation. |
Returns
| Type | Description |
|---|---|
| BuildResult | A result describing if build is successful or not. |
OnCanBuild(BuildContext)
Provides additional implementation to determine if the build pipeline satisfy requirements to build.
Declaration
protected virtual ResultBase OnCanBuild(BuildContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildContext | context | The build context for the scope of the build operation. |
Returns
| Type | Description |
|---|---|
| ResultBase | A result describing if the pipeline can build or not. |
OnCanPrepare(PrepareContext)
Provides implementation to determine if the environment can be prepared for the build pipeline before using it.
Declaration
protected virtual ResultBase OnCanPrepare(PrepareContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| PrepareContext | context |
Returns
| Type | Description |
|---|---|
| ResultBase |
OnCanRun(RunContext)
Provides additional implementation to determine if the build pipeline satisfy requirements to run the last build.
Declaration
protected virtual ResultBase OnCanRun(RunContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RunContext | context | The run context for the scope of the run operation. |
Returns
| Type | Description |
|---|---|
| ResultBase | A result describing if the pipeline can run or not. |
OnClean(CleanContext)
Provides implementation to clean files produced by the build of this build pipeline corresponding to the specified build configuration.
Declaration
protected abstract CleanResult OnClean(CleanContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| CleanContext | context | The clean context for the scope of the clean operation. |
Returns
| Type | Description |
|---|---|
| CleanResult | A result describing if clean is successful or not |
OnPrepare(PrepareContext)
Provides implementation when preparing the environment for the build pipeline before using it.
Declaration
protected virtual ResultBase OnPrepare(PrepareContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| PrepareContext | context |
Returns
| Type | Description |
|---|---|
| ResultBase |
OnRun(RunContext)
Provides implementation to run the last build of this build pipeline corresponding to the specified build configuration.
Declaration
protected abstract RunResult OnRun(RunContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RunContext | context | The run context for the scope of the run operation. |
Returns
| Type | Description |
|---|---|
| RunResult | A result describing if run is successful or not. |
Prepare(BuildConfiguration)
Prepare the environment to use the build pipeline.
Declaration
public ResultBase Prepare(BuildConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration. |
Returns
| Type | Description |
|---|---|
| ResultBase | A result indicating if the operation is successful. |
Run(BuildConfiguration, RunTargetBase[])
Run the last build of this build pipeline corresponding to the specified build configuration.
Declaration
public RunResult Run(BuildConfiguration config, params RunTargetBase[] runTargets)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildConfiguration | config | The build configuration corresponding to the build to be run. |
| RunTargetBase[] | runTargets | List of devices to deploy and run on. |
Returns
| Type | Description |
|---|---|
| RunResult | A result describing if run is successful or not. |