Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


InstantiateArray

Creates a new instance of an array with the given count.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.Properties
  • Assembly: UnityEngine.PropertiesModule

InstantiateArray<T>(int)

Creates a new instance of an array with the given count.
public static TArray InstantiateArray<TArray>(int count = 0)

Parameters

count

The size of the array to instantiate.

Returns

Type

Description

TThe array newly created array.

InstantiateArray<T>(Type, int)

Creates a new instance of an array with the given type and given count.
public static TArray InstantiateArray<TArray>(Type derivedType, int count = 0)

Parameters

derivedType

The type we want to create a new instance of.

count

The size of the array to instantiate.

Returns

Type

Description

TThe array newly created array.