Method GetDataAtTick
GetDataAtTick<T>(DynamicBuffer<T>, NetworkTick, out T)
Get latest command data for given target tick. For example, if command buffer contains ticks 3,4,5,6 and targetTick is 5 it will return tick 5 (latest without going over). If the command buffer is 1,2,3 and targetTick is 5 it will return tick 3.
Declaration
public static bool GetDataAtTick<T>(this DynamicBuffer<T> commandArray, NetworkTick targetTick, out T commandData) where T : unmanaged, ICommandData
Parameters
| Type | Name | Description |
|---|---|---|
| DynamicBuffer<T> | commandArray | Command input buffer. |
| NetworkTick | targetTick | Target tick to fetch from. |
| T | commandData | The last-received input. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if any data was found, false when no tick data is equal or older to the target tick in the buffer. |
Type Parameters
| Name | Description |
|---|---|
| T | Command input buffer type. |