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"
.
Namespace: UnityEngine.InputSystem
Syntax
public struct 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 readonly string displayName { get; }
Property Value
Type | Description |
---|---|
String |
See Also
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 readonly string layout { get; }
Property Value
Type | Description |
---|---|
String |
See Also
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 readonly string name { get; }
Property Value
Type | Description |
---|---|
String |
See Also
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 readonly IEnumerable<string> usages { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
See Also
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 |
---|---|
Boolean | True if |