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

    Class InputValue

    Wraps around values provided by input actions.

    Inheritance
    Object
    InputValue
    Namespace: UnityEngine.InputSystem
    Syntax
    public class InputValue
    Remarks

    This is a wrapper around InputAction.CallbackContext chiefly for use with GameObject messages (i.e. SendMessage). It exists so that action callback data can be represented as an object, can be reused, and shields the receiver from having to know about action callback specifics.

    Properties

    isPressed

    Declaration
    public bool isPressed { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Get()

    Read the value as an object.

    Declaration
    public object Get()
    Returns
    Type Description
    Object

    The current value in the form of a boxed object.

    Remarks

    This method allocates GC memory and will thus created garbage. If used during gameplay, it will lead to GC spikes.

    Get<TValue>()

    Declaration
    public TValue Get<TValue>()
        where TValue : struct
    Returns
    Type Description
    TValue
    Type Parameters
    Name Description
    TValue

    See Also

    InputAction
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)