文档

Unity Engine

Unity Engine

TryInstantiateArray<TArray>(int, out TArray)

Tries to create a new instance of an array with the given count.
阅读时间1 分钟最后更新于 2 天前

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 \<typeparamref name="TArray" /\>.

Returns

Type

Description

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