Struct InputStateHistory<TValue>.Record
State change record
Implements
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 Input
Properties
control
The control associated with the input state record.
Declaration
public InputControl<TValue> control { get; }
Property Value
Type | Description |
---|---|
Input |
The control associated with the input state record. |
Exceptions
Type | Condition |
---|---|
Invalid |
When the record is no longer value. |
See Also
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 |
---|---|
Invalid |
When the record is no longer value. |
See Also
next
The next input state record in the owning container.
Declaration
public InputStateHistory<TValue>.Record next { get; }
Property Value
Type | Description |
---|---|
Input |
The next input state record in the owning Input |
Exceptions
Type | Condition |
---|---|
Invalid |
When the record is no longer value. |
See Also
owner
Identifies the owning container for the record.
Declaration
public InputStateHistory<TValue> owner { get; }
Property Value
Type | Description |
---|---|
Input |
The owning Input |
Remarks
Identifies the owning Input
See Also
previous
The previous input state record in the owning container.
Declaration
public InputStateHistory<TValue>.Record previous { get; }
Property Value
Type | Description |
---|---|
Input |
The previous input state record in the owning Input |
Exceptions
Type | Condition |
---|---|
Invalid |
When the record is no longer value. |
See Also
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.
current |
Exceptions
Type | Condition |
---|---|
Invalid |
When the record is no longer value. |
See Also
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
Methods
CopyFrom(Record)
Copy data from one record to another.
Declaration
public void CopyFrom(InputStateHistory<TValue>.Record record)
Parameters
Type | Name | Description |
---|---|---|
Input |
record | Source Record to copy from. |
Remarks
Copy data from one record to another.
Exceptions
Type | Condition |
---|---|
Argument |
When the source record history is not valid. |
Invalid |
When the control is not tracked by the owning Input |
See Also
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
Remarks
Compare two records.
See Also
Equals(Record)
Compare two records.
Declaration
public bool Equals(InputStateHistory<TValue>.Record other)
Parameters
Type | Name | Description |
---|---|---|
Input |
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
GetHashCode()
Return the hash code of the record.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code of the record. |
Overrides
Remarks
Return the hash code of the record.
See Also
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
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
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 |
---|---|
Invalid |
When the record is no longer value or the specified type is not present. |
See Also
ToString()
Return the string representation of the record.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string representation of the record. |
Overrides
Remarks
Includes the control, value and time of the record (or <Invalid> if not valid).