Method GetInputAtIndex
GetInputAtIndex<T>(DynamicBuffer<T>, int)
Get a readonly reference to the input at the given index. Need to be used in safe context, where you know the buffer is not going to be modified. That would invalidate the reference in that case and we can't guaratee the data you are reading is going to be valid anymore.
Declaration
public static ref readonly T GetInputAtIndex<T>(this DynamicBuffer<T> buffer, int index) where T : unmanaged, ICommandData
Parameters
Type | Name | Description |
---|---|---|
DynamicBuffer<T> | buffer | |
int | index |
Returns
Type | Description |
---|---|
T | A readonly reference to the element |
Type Parameters
Name | Description |
---|---|
T |