ConvertExistingDataToNativeArray<T>(void*, int, AllocatorHandle, bool)
Convert existing data into a NativeArray.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
public static NativeArray<T> ConvertExistingDataToNativeArray<T>(void* dataPointer, int length, AllocatorManager.AllocatorHandle allocator, bool setTempMemoryHandle = false) where T : unmanaged
Parameters
Pointer to the data to be converted.
The count of elements.
The Allocator to use.
Use temporary memory atomic safety handle.
Returns
Type | Description |
|---|---|
| NativeArray<T> | Returns the NativeArray that was created. |
Remarks
The caller is still the owner of the data.