기술 자료

Unity Engine

Unity Engine

TryGetDefaultValue<T>(out T)

Retrieves the default value of the variable.
읽는 시간 1분최근 업데이트: 2달 전

Definition

TryGetDefaultValue<T>(T)

bool TryGetDefaultValue<T>(out T value)

Parameters

value

T
The retrieved default value, if available.

Returns

Type

Description

bool
true
if a default value exists and is of the correct type; otherwise,
false
.

Remarks

Use this method to retrieve the variable’s default value in a type-safe way.