Interface IBuildContext
Base interface for build data container system
Namespace: UnityEditor.Build.Pipeline.Interfaces
Assembly: Unity.ScriptableBuildPipeline.Editor.dll
Syntax
public interface IBuildContext
Methods
ContainsContextObject(Type)
Checks the build context for existence of a data that is of the specified type.
Declaration
bool ContainsContextObject(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type of data to check for existence. |
Returns
Type | Description |
---|---|
bool |
|
ContainsContextObject<T>()
Checks the build context for existence of a data that is of the specified type.
Declaration
bool ContainsContextObject<T>() where T : IContextObject
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | Type of data to check for existence. |
GetContextObject(Type)
Gets the data of the specified type contained in the build context.
Declaration
IContextObject GetContextObject(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type of data to return. |
Returns
Type | Description |
---|---|
IContextObject | The type of data specified. |
GetContextObject<T>()
Gets the data of the specified type contained in the build context.
Declaration
T GetContextObject<T>() where T : IContextObject
Returns
Type | Description |
---|---|
T | The type of data specified. |
Type Parameters
Name | Description |
---|---|
T | Type of data to return. |
SetContextObject(Type, IContextObject)
Adds the data of the specified type to the build context.
Declaration
void SetContextObject(Type type, IContextObject contextObject)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type of data to add. |
IContextObject | contextObject | Object holding the data to add. |
SetContextObject(IContextObject)
Adds the data to the build context. Type will be inferred using Reflection.
Declaration
void SetContextObject(IContextObject contextObject)
Parameters
Type | Name | Description |
---|---|---|
IContextObject | contextObject | Object holding the data to add. |
SetContextObject<T>(IContextObject)
Adds the data of the specified type to the build context.
Declaration
void SetContextObject<T>(IContextObject contextObject) where T : IContextObject
Parameters
Type | Name | Description |
---|---|---|
IContextObject | contextObject | Object holding the data to add. |
Type Parameters
Name | Description |
---|---|
T | Type of data to add. |
TryGetContextObject(Type, out IContextObject)
Tries to get the data of the specified type contained in the build context.
Declaration
bool TryGetContextObject(Type type, out IContextObject contextObject)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type of data to return. |
IContextObject | contextObject | The object holding the data to be returned if found. |
Returns
Type | Description |
---|---|
bool |
|
TryGetContextObject<T>(out T)
Tries to get the data of the specified type contained in the build context.
Declaration
bool TryGetContextObject<T>(out T contextObject) where T : IContextObject
Parameters
Type | Name | Description |
---|---|---|
T | contextObject | The object holding the data to be returned if found. |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | Type of data to return. |