文档

Unity Engine

Unity Engine

TryCreateInstance(out TContainer)

Tries to create a new instance of TContainer.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

TryCreateInstance(T)

public bool TryCreateInstance(out TContainer instance)

Parameters

instance

T
When this method returns, contains the created instance, if type instantiation succeeded; otherwise, the default value for \<typeparamref name="TContainer" /\>.

Returns

Type

Description

bool
true
if a new instance of type TContainer was created; otherwise,
false
.