Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TrySetValue<T>(T)

Sets the value of the constant node to the specified value of type T.
Read time 1 minuteLast updated 6 days ago

Definition

bool TrySetValue<T>(T value)

Parameters

value

T
The value to set.

Returns

Type

Description

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

Remarks

This method provides type-safe access to the constant's stored value. It performs a type check and conversion internally. If the value cannot be cast to IConstantNode.DataType, the method returns
false
.