Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CanBeInstantiated

Returns true if the specified type is instantiatable.
Read time 1 minuteLast updated 12 days ago

Definition

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

CanBeInstantiated(Type)

Returns
true
if the specified type is instantiatable.
public static bool CanBeInstantiated(Type type)

Parameters

type

The type to query.

Returns

Type

Description

bool
true
if the given type is instantiatable.

Remarks

Instantiatable is defined as either having a default or implicit constructor or having a registered instantiation method.

CanBeInstantiated<T>()

Returns
true
if type
T
is instantiatable.
public static bool CanBeInstantiated<T>()

Returns

Type

Description

bool
true
if type
T
is instantiatable.

Remarks

Instantiatable is defined as either having a default or implicit constructor or having a registered instantiation method.