UnsafeBitArray
Initializes and returns an instance of UnsafeBitArray which aliases an existing buffer.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Constructor
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.ManagedKernelModule
UnsafeBitArray(void*, int, AllocatorHandle)
Initializes and returns an instance of UnsafeBitArray which aliases an existing buffer.
public UnsafeBitArray(void* ptr, int sizeInBytes, AllocatorManager.AllocatorHandle allocator = default)
Parameters
An existing buffer.
The number of bytes. The length will be .
sizeInBytes * 8The allocator that was used to allocate the bytes. Needed to dispose this array.
UnsafeBitArray(int, AllocatorHandle, NativeArrayOptions)
Initializes and returns an instance of UnsafeBitArray.
public UnsafeBitArray(int numBits, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
Parameters
Number of bits.
The allocator to use.
Whether newly allocated bytes should be zeroed out.