Struct InputControlScheme.MatchResult.Match
A single matched InputControlScheme.DeviceRequirement.
Namespace: UnityEngine.InputSystem
Assembly: Unity.InputSystem.dll
Syntax
public struct InputControlScheme.MatchResult.Match
Remarks
Links the control that was matched with the respective device requirement.
Properties
control
The control that was match from the requirement's controlPath
Declaration
public InputControl control { get; }
Property Value
Type | Description |
---|---|
InputControl |
Remarks
This is the same as device if the control path matches the device directly rather than matching a control on the device.
Note that while a control path can match arbitrary many controls, only the first matched control will be returned here. To get all controls that were matched by a specific requirement, a manual query must be performed using InputControlPath.
If the match failed, this will be null.
device
The device that got matched.
Declaration
public InputDevice device { get; }
Property Value
Type | Description |
---|---|
InputDevice |
Remarks
If a specific control on the device was matched, this will be device or control. If a device was matched directly, this will be the same as control.
isOptional
Declaration
public bool isOptional { get; }
Property Value
Type | Description |
---|---|
bool |
requirement
The device requirement that got matched.
Declaration
public InputControlScheme.DeviceRequirement requirement { get; }
Property Value
Type | Description |
---|---|
InputControlScheme.DeviceRequirement |
requirementIndex
Index of the requirement in deviceRequirements.
Declaration
public int requirementIndex { get; }
Property Value
Type | Description |
---|---|
int |