Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Allocate

Allocate space in a buffer.
Read time 1 minuteLast updated 23 days ago

Definition

Allocate<T>()

Allocate space in a buffer.
public ref T Allocate<T>() where T : unmanaged

Returns

Type

Description

TA reference to the allocation.

Remarks

The space is allocated in the buffer which was specified with UnsafeStream.Writer.BeginForEachIndex.

Allocate(int)

Allocate space in a buffer.
public byte* Allocate(int size)

Parameters

size

The number of bytes to allocate.

Returns

Type

Description

byte*The allocation.

Remarks

The space is allocated in the buffer which was specified with UnsafeStream.Writer.BeginForEachIndex.