docs.unity3d.com
    Show / Hide Table of Contents

    Class InputStateHistory<TValue>

    Records value changes of a given control over time.

    Inheritance
    Object
    InputStateHistory
    InputStateHistory<TValue>
    Inherited Members
    InputStateHistory.Count
    InputStateHistory.version
    InputStateHistory.historyDepth
    InputStateHistory.extraMemoryPerRecord
    InputStateHistory.updateMask
    InputStateHistory.controls
    InputStateHistory.onRecordAdded
    InputStateHistory.onShouldRecordStateChange
    InputStateHistory.Clear()
    InputStateHistory.AddRecord(InputStateHistory.Record)
    InputStateHistory.StartRecording()
    InputStateHistory.StopRecording()
    InputStateHistory.RecordStateChange(InputControl, InputEventPtr)
    InputStateHistory.RecordStateChange(InputControl, Void*, Double)
    InputStateHistory.Dispose()
    InputStateHistory.Destroy()
    InputStateHistory.RecordIndexToUserIndex(Int32)
    InputStateHistory.UserIndexToRecordIndex(Int32)
    InputStateHistory.GetRecord(Int32)
    InputStateHistory.AllocateRecord(Int32)
    InputStateHistory.ReadValue<TValue>(InputStateHistory.RecordHeader*)
    InputStateHistory.ReadValueAsObject(InputStateHistory.RecordHeader*)
    InputStateHistory.IInputStateChangeMonitor.NotifyControlStateChanged(InputControl, Double, InputEventPtr, Int64)
    InputStateHistory.IInputStateChangeMonitor.NotifyTimerExpired(InputControl, Double, Int64, Int32)
    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    public class InputStateHistory<TValue> : InputStateHistory, IDisposable, IEnumerable<InputStateHistory.Record>, IInputStateChangeMonitor, IReadOnlyList<InputStateHistory<TValue>.Record>, IReadOnlyCollection<InputStateHistory<TValue>.Record>, IEnumerable<InputStateHistory<TValue>.Record>, IEnumerable where TValue : struct
    Type Parameters
    Name Description
    TValue

    Constructors

    InputStateHistory(Nullable<Int32>)

    Declaration
    public InputStateHistory(int? maxStateSizeInBytes = null)
    Parameters
    Type Name Description
    Nullable<Int32> maxStateSizeInBytes

    InputStateHistory(String)

    Declaration
    public InputStateHistory(string path)
    Parameters
    Type Name Description
    String path

    InputStateHistory(InputControl<TValue>)

    Declaration
    public InputStateHistory(InputControl<TValue> control)
    Parameters
    Type Name Description
    InputControl<TValue> control

    Properties

    Item[Int32]

    Declaration
    public InputStateHistory<TValue>.Record this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index
    Property Value
    Type Description
    InputStateHistory.Record<>
    Implements
    IReadOnlyList<T>.Item[Int32]

    Methods

    AddRecord(InputStateHistory<TValue>.Record)

    Declaration
    public InputStateHistory<TValue>.Record AddRecord(InputStateHistory<TValue>.Record record)
    Parameters
    Type Name Description
    InputStateHistory.Record<> record
    Returns
    Type Description
    InputStateHistory.Record<>

    Finalize()

    Declaration
    protected void Finalize()

    GetEnumerator()

    Declaration
    public IEnumerator<InputStateHistory<TValue>.Record> GetEnumerator()
    Returns
    Type Description
    IEnumerator<InputStateHistory.Record<>>
    Implements
    IEnumerable<T>.GetEnumerator()

    RecordStateChange(InputControl<TValue>, TValue, Double)

    Declaration
    public InputStateHistory<TValue>.Record RecordStateChange(InputControl<TValue> control, TValue value, double time = -1)
    Parameters
    Type Name Description
    InputControl<TValue> control
    TValue value
    Double time
    Returns
    Type Description
    InputStateHistory.Record<>

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator
    Implements
    IEnumerable.GetEnumerator()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023