Method Reinterpret
Reinterpret<U>()
Returns a dynamic buffer of a different type, pointing to the same buffer memory.
Declaration
public DynamicBuffer<U> Reinterpret<U>() where U : unmanaged
Returns
Type | Description |
---|---|
DynamicBuffer<U> | A dynamic buffer of the reinterpreted type. |
Type Parameters
Name | Description |
---|---|
U | The reinterpreted type. |
Remarks
No memory modification occurs. The reinterpreted type must be the same size in memory as the original type.
Examples
new ReinterpretJob().ScheduleParallel();
Exceptions
Type | Condition |
---|---|
InvalidOperationException | If the reinterpreted type is a different size than the original. |