Class InjectContextAttribute | Scriptable Build Pipeline | 1.13.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class InjectContextAttribute

    Use to pass around information between build tasks.

    Inheritance
    Object
    Attribute
    InjectContextAttribute
    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
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023