文档

Unity Engine

Unity Engine

NativeReference

Initializes and returns an instance of NativeReference.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

NativeReference(AllocatorHandle, NativeArrayOptions)

Initializes and returns an instance of NativeReference.
public NativeReference(AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)

Parameters

The allocator to use.

Whether newly allocated bytes should be zeroed out.

NativeReference(T, AllocatorHandle)

Initializes and returns an instance of NativeReference.
public NativeReference(T value, AllocatorManager.AllocatorHandle allocator)

Parameters

value

T

The allocator to use.