Version: 2021.3

UnsafeUtility.Malloc(ulong,int,Allocator)

切换到手册

参数

size 大小。
alignment 对齐方式。
allocator 分配器。

返回

void 内存指针。

描述

分配内存。

Note: The memory allocated is not initialized to zero. To release the memory, use UnsafeUtility.Free.