Constructor DataStreamWriter
DataStreamWriter(int, Allocator)
Initializes a new instance of the DataStreamWriter struct.
Declaration
public DataStreamWriter(int length, Allocator allocator)
Parameters
| Type | Name | Description |
|---|---|---|
| int | length | The length of the buffer. |
| Allocator | allocator | The Allocator used to allocate the memory. |
DataStreamWriter(NativeArray<byte>)
Initializes a new instance of the DataStreamWriter struct with a NativeArray{byte}
Declaration
public DataStreamWriter(NativeArray<byte> data)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeArray<byte> | data | The buffer we want to attach to our DataStreamWriter. |
DataStreamWriter(byte*, int)
Initializes a new instance of the DataStreamWriter struct with a memory we don't own
Declaration
public DataStreamWriter(byte* data, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| byte* | data | Pointer to the data |
| int | length | Length of the data |