The y
field in the RangedFloat
struct represents the upper bound of the float range. It is marked as obsolete and should not be used in new code. Instead, use the Max
property to access the maximum value of the range.
The y
field in the RangedFloat
struct represents the upper bound of the float range. It is marked as obsolete and should not be used in new code. Instead, use the Max
property to access the maximum value of the range.
Although the y
field is publicly accessible, it is recommended to use the Max
property for accessing the maximum value of a RangedFloat
instance. This ensures compatibility with future updates and maintains code clarity.
// Example of using RangedFloat with the recommended Max property RangedFloat rangedFloat = new RangedFloat(); // Set the maximum value using the Max property rangedFloat.Max = 10.0f; // Access the maximum value using the Max property float maxValue = rangedFloat.Max; // Obsolete usage (not recommended) // float obsoleteMaxValue = rangedFloat.y; // This will generate a warning