Method GetPayloadDataRef
GetPayloadDataRef<T>(int)
Get a reference to the payload data reinterpreted to the type T.
Declaration
public ref T GetPayloadDataRef<T>(int offset = 0) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| int | offset | Offset from the start of the payload. |
Returns
| Type | Description |
|---|---|
| T | Returns a reference to the payload data |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the data. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If there is not enough bytes in the payload for the specified type. Only thrown when collections checks are enabled (i.e. in the editor). Otherwise the obtained reference may be partially corrupted. |