Class BuildConfiguration
Can stores a set of hierarchical build components per type, which can be inherited or overridden using dependencies.
Inheritance
Inherited Members
Namespace: Unity.Build
Syntax
public sealed class BuildConfiguration : HierarchicalComponentContainer<BuildConfiguration, IBuildComponent>, ISerializationCallbackReceiver
Fields
AssetExtension
File extension for build configuration assets.
Declaration
public const string AssetExtension = ".buildconfiguration"
Field Value
| Type | Description |
|---|---|
| String |
Methods
Build()
Run the build pipeline of this build configuration to build the target.
Declaration
public BuildPipelineResult Build()
Returns
| Type | Description |
|---|---|
| BuildPipelineResult | The result of the build pipeline build. |
CanBuild(out String)
Determine if the build pipeline of this build configuration can build.
Declaration
public bool CanBuild(out string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| String | reason | If CanBuild(out String) returns false, the reason why it fails. |
Returns
| Type | Description |
|---|---|
| Boolean | Whether or not the build pipeline can build. |
CanRun(out String)
Determine if the build pipeline of this build configuration can run.
Declaration
public bool CanRun(out string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| String | reason | If CanRun(out String) returns false, the reason why it fails. |
Returns
| Type | Description |
|---|---|
| Boolean | Whether or not the build pipeline can run. |
GetBuildPipeline()
Retrieve the build pipeline of this build configuration.
Declaration
public BuildPipeline GetBuildPipeline()
Returns
| Type | Description |
|---|---|
| BuildPipeline | The build pipeline if found, otherwise null. |
GetLastBuildArtifact(Type)
Get the value of the first build artifact that is assignable to type Type.
Declaration
public IBuildArtifact GetLastBuildArtifact(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type of the build artifact. |
Returns
| Type | Description |
|---|---|
| IBuildArtifact | The build artifact if found, otherwise null. |
GetLastBuildArtifact<T>()
Get the value of the first build artifact that is assignable to type T.
Declaration
public T GetLastBuildArtifact<T>()
where T : class, IBuildArtifact
Returns
| Type | Description |
|---|---|
| T | The build artifact if found, otherwise null. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the build artifact. |
GetLastBuildResult()
Get the last build result for this build configuration.
Declaration
public BuildPipelineResult GetLastBuildResult()
Returns
| Type | Description |
|---|---|
| BuildPipelineResult | The build result if found, otherwise null. |
Run()
Run the resulting target from building the build pipeline of this build configuration.
Declaration
public RunStepResult Run()
Returns
| Type | Description |
|---|---|
| RunStepResult |