Class BuildPipeline
Defines a list of IBuildStep to run in order.
Inherited Members
Namespace: Unity.Build
Syntax
public sealed class BuildPipeline : ScriptableObjectPropertyContainer<BuildPipeline>, ISerializationCallbackReceiver, IBuildStep
Fields
AssetExtension
File extension for BuildPipeline assets.
Declaration
public const string AssetExtension = ".buildpipeline"
Field Value
Type | Description |
---|---|
String |
BuildSteps
Declaration
public List<IBuildStep> BuildSteps
Field Value
Type | Description |
---|---|
List<IBuildStep> |
RunStep
Declaration
public IRunStep RunStep
Field Value
Type | Description |
---|---|
IRunStep |
Properties
Description
Description of this BuildPipeline displayed in build progress reporting.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
String |
Implements
OptionalComponents
List of IBuildSettingsComponent derived types that are optional for this BuildPipeline.
Declaration
public Type[] OptionalComponents { get; }
Property Value
Type | Description |
---|---|
Type[] |
Implements
RequiredComponents
List of IBuildSettingsComponent derived types that are required for this BuildPipeline.
Declaration
public Type[] RequiredComponents { get; }
Property Value
Type | Description |
---|---|
Type[] |
Implements
Methods
Build(BuildSettings, BuildProgress, Action<BuildContext>)
Build this BuildPipeline.
Declaration
public BuildPipelineResult Build(BuildSettings settings, BuildProgress progress = null, Action<BuildContext> mutator = null)
Parameters
Type | Name | Description |
---|---|---|
BuildSettings | settings | The BuildSettings used for the build. |
BuildProgress | progress | Optional build progress that will be displayed when executing the build. |
Action<BuildContext> | mutator | Optional mutator that can be used to modify the BuildContext before building. |
Returns
Type | Description |
---|---|
BuildPipelineResult | The result of building this BuildPipeline. |
CanBuild(BuildSettings, out String)
Determine if this BuildPipeline can build.
Declaration
public bool CanBuild(BuildSettings settings, out string reason)
Parameters
Type | Name | Description |
---|---|---|
BuildSettings | settings | The BuildSettings used for the build. |
String | reason | If CanBuild(BuildSettings, out String) returns false, the reason why it fails. |
Returns
Type | Description |
---|---|
Boolean | true if this BuildPipeline can build, otherwise false. |
CanRun(BuildSettings, out String)
Determine if this BuildPipeline can run.
Declaration
public bool CanRun(BuildSettings settings, out string reason)
Parameters
Type | Name | Description |
---|---|---|
BuildSettings | settings | The BuildSettings used for the build. |
String | reason | If CanRun(BuildSettings, out String) returns false, the reason why it fails. |
Returns
Type | Description |
---|---|
Boolean | The result of running this BuildPipeline. |
CleanupBuildStep(BuildContext)
Cleanup the IBuildStep list of this BuildPipeline. Cleanup will only be called for IBuildStep that ran.
Declaration
public BuildStepResult CleanupBuildStep(BuildContext context)
Parameters
Type | Name | Description |
---|---|---|
BuildContext | context | The BuildContext used by the execution of this BuildPipeline. |
Returns
Type | Description |
---|---|
BuildStepResult |
Implements
IsEnabled(BuildContext)
Determine if this BuildPipeline will be executed or not.
Declaration
public bool IsEnabled(BuildContext context)
Parameters
Type | Name | Description |
---|---|---|
BuildContext | context | The BuildContext used by the execution of this BuildPipeline. |
Returns
Type | Description |
---|---|
Boolean | true if enabled, false otherwise. |
Implements
Reset()
Declaration
protected override void Reset()
Overrides
Run(BuildSettings)
Run this BuildPipeline. This will attempt to run the build target produced from building this BuildPipeline.
Declaration
public RunStepResult Run(BuildSettings settings)
Parameters
Type | Name | Description |
---|---|---|
BuildSettings | settings |
Returns
Type | Description |
---|---|
RunStepResult | The result of running this BuildPipeline. |
RunBuildStep(BuildContext)
Run the IBuildStep list of this BuildPipeline. If a IBuildStep fails, subsequent IBuildStep are not run.
Declaration
public BuildStepResult RunBuildStep(BuildContext context)
Parameters
Type | Name | Description |
---|---|---|
BuildContext | context | The BuildContext used by the execution of this BuildPipeline. |
Returns
Type | Description |
---|---|
BuildStepResult | The result of the execution of this BuildPipeline. |
Implements
Sanitize()
Declaration
protected override void Sanitize()