Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DataStreamWriter

Initializes a new instance of the DataStreamWriter struct.
Read time 1 minuteLast updated 14 days ago

Definition

  • Type: Constructor
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

DataStreamWriter(int, AllocatorHandle)

Initializes a new instance of the DataStreamWriter struct.
public DataStreamWriter(int length, AllocatorManager.AllocatorHandle allocator)

Parameters

length

The number of bytes available in the buffer.

The Allocator used to allocate the memory.

DataStreamWriter(NativeArray<byte>)

Initializes a new instance of the DataStreamWriter struct with a NativeArray\<byte\>
public DataStreamWriter(NativeArray<byte> data)

Parameters

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
public DataStreamWriter(byte* data, int length)

Parameters

data

Pointer to the data

length

Length of the data