docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct InputControlPath.ParsedPathComponent

    A single component of a parsed control path as returned by Parse(string). For example, in the control path "<Gamepad>/buttonSouth", there are two parts: "<Gamepad>" and "buttonSouth".

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: UnityEngine.InputSystem
    Assembly: Unity.InputSystem.dll
    Syntax
    public struct InputControlPath.ParsedPathComponent

    Properties

    displayName

    Display name of the device or control (the part inside of '#(...)') referenced in the component or null. In "<Keyboard>/#()", for example, the first component will have a null displayName and the second component will have a displayName of "".

    Declaration
    public string displayName { get; }
    Property Value
    Type Description
    string
    See Also
    displayName

    layout

    Name of the layout (the part between '<' and '>') referenced in the component or null if no layout is specified. In "<Gamepad>/buttonSouth" the first component will return "Gamepad" from this property and the second component will return null.

    Declaration
    public string layout { get; }
    Property Value
    Type Description
    string
    See Also
    InputControlLayout
    LoadLayout(string)
    layout

    name

    Name of the device or control referenced in the component or null In "<Gamepad>/buttonSouth", for example, the first component will have a null name and the second component will have "buttonSouth" in the name.

    Declaration
    public string name { get; }
    Property Value
    Type Description
    string
    See Also
    name

    usages

    List of device or control usages (the part between '{' and '}') referenced in the component or an empty enumeration. In "<XRController>{RightHand}/trigger", for example, the first component will have a single element "RightHand" in the enumeration and the second component will have an empty enumeration.

    Declaration
    public IEnumerable<string> usages { get; }
    Property Value
    Type Description
    IEnumerable<string>
    See Also
    usages
    AddDeviceUsage(InputDevice, string)

    Methods

    Matches(InputControl)

    Whether the given control matches the constraints of this path component.

    Declaration
    public bool Matches(InputControl control)
    Parameters
    Type Name Description
    InputControl control

    Control to match against the path spec.

    Returns
    Type Description
    bool

    True if control matches the constraints.

    See Also
    Parse(string)

    See Also

    Parse(string)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)