Class InjectContextAttribute
Use to pass around information between build tasks.
Implements
Inherited Members
Namespace: UnityEditor .Build.Pipeline.Injector
Assembly: Unity.ScriptableBuildPipeline.Editor.dll
Syntax
[AttributeUsage(AttributeTargets.Field)]
public class InjectContextAttribute : Attribute, _Attribute
Constructors
InjectContextAttribute(ContextUsage, bool)
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 |
---|---|---|
Context |
usage | The usage behavior for the attribute. By default it is set to In |
bool | 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 |
---|---|
bool |
Usage
Stores the how the attribute is used among build tasks.
Declaration
public ContextUsage Usage { get; set; }
Property Value
Type | Description |
---|---|
Context |