Documentation

Unity Engine


User Manual

Script Reference

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 4 days ago

Definition

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

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
.