Documentation

Unity Engine

Download Unity

Unity Engine

TryInstantiateArray<TArray>(int, out TArray)

Tries to create a new instance of an array with the given count.
Read time 1 minuteLast updated 5 hours ago

Definition

TryInstantiateArray<T>(int, T)

public static bool TryInstantiateArray<TArray>(int count, out TArray instance)

Parameters

count

The count the array should have.

instance

T
When this method returns, contains the created instance, if type instantiation succeeded; otherwise, the default value for
TArray
.

Returns

Type

Description

bool
true
if the type was instantiated; otherwise,
false
.