Description
The Max
property of the ConnectionHandleConfig
struct in the Editor.NodeEditor
namespace represents the maximum allowable value for a connection handle. This property is nullable, meaning it can hold a floating-point number or be null, indicating that there is no maximum constraint.
Usage
Use the Max
property to define or retrieve the upper limit for a connection handle's value. This can be useful when you need to enforce constraints on the values that a connection can take within a node editor environment.
To set the maximum value, simply assign a float
value to the Max
property. If no maximum constraint is needed, you can set it to null
.
Example
// Example of setting the Max property
ConnectionHandleConfig config = new ConnectionHandleConfig();
config.Max = 100.0f; // Set the maximum value to 100
// Example of checking the Max property
if (config.Max.HasValue)
{
float maxValue = config.Max.Value;
// Use maxValue as needed
}
else
{
// Handle the case where there is no maximum constraint
}