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

    Interface IInputStateChangeMonitor

    Interface used to monitor input state changes.

    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    public interface IInputStateChangeMonitor
    Remarks

    Use AddChangeMonitor(InputControl, IInputStateChangeMonitor, Int64, UInt32) to install a state change monitor receiving state change callbacks for a specific control.

    Methods

    NotifyControlStateChanged(InputControl, Double, InputEventPtr, Int64)

    Called when the state monitored by a state change monitor has been modified.

    Declaration
    void NotifyControlStateChanged(InputControl control, double time, InputEventPtr eventPtr, long monitorIndex)
    Parameters
    Type Name Description
    InputControl control

    Control that is being monitored by the state change monitor and that had its state memory changed.

    Double time

    Time on the time timeline at which the control state change was received.

    InputEventPtr eventPtr

    If the state change was initiated by a state event (either a StateEvent or DeltaStateEvent), this is the pointer to that event. Otherwise it is pointer that is still valid, but refers a "dummy" event that is not a StateEvent or DeltaStateEvent.

    Int64 monitorIndex

    Index of the monitor as passed to AddChangeMonitor(InputControl, IInputStateChangeMonitor, Int64, UInt32).

    Remarks

    To signal that the state change has been processed by the monitor and that no other pending notifications on the same monitor instance should be sent, set the handled flag to true on eventPtr. Note, however, that aside from only silencing change monitors on the same IInputStateChangeMonitor instance, it also only silences change monitors with the same groupIndex value as supplied to AddChangeMonitor(InputControl, IInputStateChangeMonitor, Int64, UInt32).

    NotifyTimerExpired(InputControl, Double, Int64, Int32)

    Called when a timeout set on a state change monitor has expired.

    Declaration
    void NotifyTimerExpired(InputControl control, double time, long monitorIndex, int timerIndex)
    Parameters
    Type Name Description
    InputControl control

    Control on which the timeout expired.

    Double time

    Input time at which the timer expired. This is the time at which an Update() is being run whose currentTime is past the time of expiration.

    Int64 monitorIndex

    Index of the monitor as given to AddChangeMonitor(InputControl, IInputStateChangeMonitor, Int64, UInt32).

    Int32 timerIndex

    Index of the timer as given to AddChangeMonitorTimeout(InputControl, IInputStateChangeMonitor, Double, Int64, Int32).

    See Also
    AddChangeMonitorTimeout(InputControl, IInputStateChangeMonitor, Double, Int64, Int32)

    See Also

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