docs.unity3d.com
    目次を表示する/隠す

    Struct InputControlScheme.MatchResult.Match

    A single matched InputControlScheme.DeviceRequirement.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: UnityEngine.InputSystem
    Syntax
    public struct 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 readonly InputControl control { get; }
    Property Value
    Type Description
    InputControl
    Remarks

    This is the same as device if the controlPath 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 readonly 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 readonly bool isOptional { get; }
    Property Value
    Type Description
    Boolean

    requirement

    The device requirement that got matched.

    Declaration
    public readonly InputControlScheme.DeviceRequirement requirement { get; }
    Property Value
    Type Description
    InputControlScheme.DeviceRequirement

    requirementIndex

    Index of the requirement in deviceRequirements.

    Declaration
    public readonly int requirementIndex { get; }
    Property Value
    Type Description
    Int32
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)