Class InjectContextAttribute
Use to pass around information between build tasks.
Namespace: UnityEditor.Build.Pipeline.Injector
Syntax
[AttributeUsage(AttributeTargets.Field)]
public class InjectContextAttribute : Attribute, _Attribute
Constructors
InjectContextAttribute(ContextUsage, Boolean)
Creates a new context attribute that stores information that can be passed between build tasks.
Declaration
public InjectContextAttribute(ContextUsage usage = ContextUsage.InOut, bool optional = false)
Parameters
Type | Name | Description |
---|---|---|
ContextUsage | usage | The usage behavior for the attribute. By default it is set to InOut. |
Boolean | optional | Set to true if using the attribute is optional. Set to false otherwise. |
Properties
Optional
Stores whether using the context attribute is optional.
Declaration
public bool Optional { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Usage
Stores the how the attribute is used among build tasks.
Declaration
public ContextUsage Usage { get; set; }
Property Value
Type | Description |
---|---|
ContextUsage |