docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct InputStateHistory<TValue>.Record

    State change record

    Implements
    IEquatable<InputStateHistory<TValue>.Record>
    Namespace: UnityEngine.InputSystem.LowLevel
    Assembly: Unity.InputSystem.dll
    Syntax
    public struct InputStateHistory<TValue>.Record : IEquatable<InputStateHistory<TValue>.Record>
    Remarks

    Input State change record stored in the InputStateHistory<TValue>

    Properties

    control

    The control associated with the input state record.

    Declaration
    public InputControl<TValue> control { get; }
    Property Value
    Type Description
    InputControl<TValue>

    The control associated with the input state record.

    Exceptions
    Type Condition
    InvalidOperationException

    When the record is no longer value.

    See Also
    InputStateHistory<TValue>

    index

    The index of the input state record in the owning container.

    Declaration
    public int index { get; }
    Property Value
    Type Description
    int

    The index of the input state record in the owning container.

    Exceptions
    Type Condition
    InvalidOperationException

    When the record is no longer value.

    See Also
    InputStateHistory<TValue>

    next

    The next input state record in the owning container.

    Declaration
    public InputStateHistory<TValue>.Record next { get; }
    Property Value
    Type Description
    InputStateHistory<TValue>.Record

    The next input state record in the owning InputStateHistory<TValue>container.

    Exceptions
    Type Condition
    InvalidOperationException

    When the record is no longer value.

    See Also
    InputStateHistory<TValue>

    owner

    Identifies the owning container for the record.

    Declaration
    public InputStateHistory<TValue> owner { get; }
    Property Value
    Type Description
    InputStateHistory<TValue>

    The owning InputStateHistory container for the record.

    Remarks

    Identifies the owning InputStateHistory container for the record.

    See Also
    InputStateHistory<TValue>

    previous

    The previous input state record in the owning container.

    Declaration
    public InputStateHistory<TValue>.Record previous { get; }
    Property Value
    Type Description
    InputStateHistory<TValue>.Record

    The previous input state record in the owning InputStateHistory<TValue>container.

    Exceptions
    Type Condition
    InvalidOperationException

    When the record is no longer value.

    See Also
    InputStateHistory<TValue>

    time

    The time stamp of the input state record.

    Declaration
    public double time { get; }
    Property Value
    Type Description
    double

    The time stamp of the input state record in the owning container. currentTime

    Exceptions
    Type Condition
    InvalidOperationException

    When the record is no longer value.

    See Also
    InputStateHistory<TValue>

    valid

    Identifies if the record is valid.

    Declaration
    public bool valid { get; }
    Property Value
    Type Description
    bool

    True if the record is a valid entry. False if invalid.

    Remarks

    When the history is cleared with Clear() the entries become invalid.

    See Also
    InputStateHistory<TValue>

    Methods

    CopyFrom(Record)

    Copy data from one record to another.

    Declaration
    public void CopyFrom(InputStateHistory<TValue>.Record record)
    Parameters
    Type Name Description
    InputStateHistory<TValue>.Record record

    Source Record to copy from.

    Remarks

    Copy data from one record to another.

    Exceptions
    Type Condition
    ArgumentException

    When the source record history is not valid.

    InvalidOperationException

    When the control is not tracked by the owning InputStateHistory<TValue> container.

    See Also
    InputStateHistory<TValue>

    Equals(object)

    Compare two records.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The record to compare with.

    Returns
    Type Description
    bool

    True if the records are the same, False if they differ.

    Overrides
    ValueType.Equals(object)
    Remarks

    Compare two records.

    See Also
    InputStateHistory<TValue>

    Equals(Record)

    Compare two records.

    Declaration
    public bool Equals(InputStateHistory<TValue>.Record other)
    Parameters
    Type Name Description
    InputStateHistory<TValue>.Record other

    The record to compare with.

    Returns
    Type Description
    bool

    True if the records are the same, False if they differ.

    Remarks

    Compare two records.

    See Also
    InputStateHistory<TValue>

    GetHashCode()

    Return the hash code of the record.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code of the record.

    Overrides
    ValueType.GetHashCode()
    Remarks

    Return the hash code of the record.

    See Also
    InputStateHistory<TValue>

    GetUnsafeExtraMemoryPtr()

    Read the extra memory for the record.

    Declaration
    public void* GetUnsafeExtraMemoryPtr()
    Returns
    Type Description
    void*

    The extra memory for the record.

    Remarks

    Additional date can be stored in a record in the extra memory section.

    See Also
    extraMemoryPerRecord

    GetUnsafeMemoryPtr()

    Read the state memory for the record.

    Declaration
    public void* GetUnsafeMemoryPtr()
    Returns
    Type Description
    void*

    The state memory for the record.

    Remarks

    Read the state memory for the record.

    See Also
    InputStateHistory<TValue>

    ReadValue()

    Returns value from the control in the Record.

    Declaration
    public TValue ReadValue()
    Returns
    Type Description
    TValue

    Returns value from the Record.

    Exceptions
    Type Condition
    InvalidOperationException

    When the record is no longer value or the specified type is not present.

    See Also
    InputStateHistory<TValue>

    ToString()

    Return the string representation of the record.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string representation of the record.

    Overrides
    ValueType.ToString()
    Remarks

    Includes the control, value and time of the record (or <Invalid> if not valid).

    See Also
    InputStateHistory<TValue>

    Implements

    IEquatable<T>

    See Also

    InputStateHistory<TValue>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)