Constructor DataStreamWriter
DataStreamWriter(int, AllocatorHandle)
Initializes a new instance of the DataStreamWriter struct.
Declaration
public DataStreamWriter(int length, AllocatorManager.AllocatorHandle allocator)
Parameters
Type | Name | Description |
---|---|---|
int | length | The number of bytes available in the buffer. |
AllocatorManager.AllocatorHandle | 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 to attach to the 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 |