Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

NativeArray<T0>.NativeArray<T0> Constructor

public NativeArray<T0>(T[] array, Unity.Collections.Allocator allocator);
public NativeArray<T0>(NativeArray<T> array, Unity.Collections.Allocator allocator);

Parameters

lengthArray length.
allocatorAllocator.
clearMemoryShould clear memory?
arraySource array to copy elements from.

Description

Create NativeArray.

Did you find this page useful? Please give it a rating: