Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IConstantNode

Interface for a specialized node that outputs a fixed value of a specific data type.
Read time 2 minutesLast updated 6 days ago

Definition

public interface IConstantNode : INode

Remarks

Use constant nodes to represent a static, predefined value in the graph. This value remains unchanged and is typically used to feed constant input into computations. To retrieve the value, use IConstantNode.TryGetValue. This method is type-safe and provides access to the node’s value if the type matches. The IConstantNode.DataType property identifies the constant's type.

Properties

Property

Description

DataTypeThe data type of the constant node's value.

Methods

Method

Description

TryGetValueRetrieves the value of the constant node as the specified type.
TrySetValueSets the value of the constant node to the specified value of type
T
.

Inheritance