기술 자료

Unity Engine

Unity Engine

TrySetValue<T>(T)

Sets a new value for the node option.
읽는 시간 1분최근 업데이트: 2달 전

Definition

bool TrySetValue<T>(T value)

Parameters

value

T
The value to assign to the option’s UI field.

Returns

Type

Description

bool
true
if the value was successfully set; otherwise,
false
.

Remarks

This method allows for editor-time modification of a node option's value. It performs a type check and conversion internally. If the value cannot be cast to INodeOption.DataType, the method returns
false
. This method triggers the Node.DefineNode method to update the node visual.