Struct InputControlLayout.ControlItem | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct InputControlLayout.ControlItem

    Specification for the composition of a direct or indirect child control.

    Namespace: UnityEngine.InputSystem.Layouts
    Syntax
    public struct ControlItem

    Fields

    aliases

    Declaration
    public ReadOnlyArray<InternedString> aliases
    Field Value
    Type Description
    ReadOnlyArray<InternedString>

    arraySize

    Declaration
    public int arraySize
    Field Value
    Type Description
    System.Int32

    bit

    Declaration
    public uint bit
    Field Value
    Type Description
    System.UInt32

    defaultState

    Optional default value for the state memory associated with the control.

    Declaration
    public PrimitiveValue defaultState
    Field Value
    Type Description
    PrimitiveValue

    displayName

    Optional display name of the control.

    Declaration
    public string displayName
    Field Value
    Type Description
    System.String
    See Also
    displayName

    format

    Declaration
    public FourCC format
    Field Value
    Type Description
    FourCC

    layout

    Declaration
    public InternedString layout
    Field Value
    Type Description
    InternedString

    maxValue

    Declaration
    public PrimitiveValue maxValue
    Field Value
    Type Description
    PrimitiveValue

    minValue

    Declaration
    public PrimitiveValue minValue
    Field Value
    Type Description
    PrimitiveValue

    name

    Name of the control.

    Declaration
    public InternedString name
    Field Value
    Type Description
    InternedString
    Remarks

    This may also be a path. This can be used to reach inside another layout and modify properties of a control inside of it. An example for this is adding a "leftStick" control using the Stick layout and then adding two control layouts that refer to "leftStick/x" and "leftStick/y" respectively to modify the state format used by the stick.

    This field is required.

    See Also
    isModifyingChildControlByPath
    name

    offset

    Declaration
    public uint offset
    Field Value
    Type Description
    System.UInt32

    parameters

    Declaration
    public ReadOnlyArray<NamedValue> parameters
    Field Value
    Type Description
    ReadOnlyArray<NamedValue>

    processors

    Declaration
    public ReadOnlyArray<NameAndParameters> processors
    Field Value
    Type Description
    ReadOnlyArray<NameAndParameters>

    shortDisplayName

    Optional abbreviated display name of the control.

    Declaration
    public string shortDisplayName
    Field Value
    Type Description
    System.String
    See Also
    shortDisplayName

    sizeInBits

    Declaration
    public uint sizeInBits
    Field Value
    Type Description
    System.UInt32

    usages

    Declaration
    public ReadOnlyArray<InternedString> usages
    Field Value
    Type Description
    ReadOnlyArray<InternedString>

    useStateFrom

    Declaration
    public string useStateFrom
    Field Value
    Type Description
    System.String

    variants

    Declaration
    public InternedString variants
    Field Value
    Type Description
    InternedString

    Properties

    isArray

    Declaration
    public bool isArray { get; }
    Property Value
    Type Description
    System.Boolean

    isFirstDefinedInThisLayout

    Declaration
    public bool isFirstDefinedInThisLayout { get; set; }
    Property Value
    Type Description
    System.Boolean

    isModifyingChildControlByPath

    Declaration
    public bool isModifyingChildControlByPath { get; set; }
    Property Value
    Type Description
    System.Boolean

    isNoisy

    Declaration
    public bool isNoisy { get; set; }
    Property Value
    Type Description
    System.Boolean

    isSynthetic

    If true, the control is considered a "synthetic" control.

    Declaration
    public bool isSynthetic { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Synthetic controls are artificial controls that provide input but do not correspond to actual controls on the hardware. An example is anyKey which is an artificial button that triggers if any key on the keyboard is pressed.

    Methods

    Merge(InputControlLayout.ControlItem)

    For any property not set on this control layout, take the setting from other.

    Declaration
    public InputControlLayout.ControlItem Merge(InputControlLayout.ControlItem other)
    Parameters
    Type Name Description
    InputControlLayout.ControlItem other

    Control layout providing settings.

    Returns
    Type Description
    InputControlLayout.ControlItem
    Remarks

    name will not be touched.

    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