Game.UI.Debug.FloatArrowField
Assembly: Assembly-CSharp
Namespace: Game.UI.Debug
Type: public class
Base: Game.UI.Widgets.FloatField
Summary:
A small UI field adapter used in debug UI that converts a Unity.Mathematics.double4 (vector-like) input into the scalar value used by the FloatField
Fields
This class does not declare any instance fields. All state is provided/managed by the base class FloatField
Properties
-
protected override double defaultMin
Overrides the base default minimum for the field. This implementation returns double.MinValue so there is no practical lower bound imposed by the field itself. -
protected override double defaultMax
Overrides the base default maximum for the field. This implementation returns double.MaxValue so there is no practical upper bound imposed by the field itself.
Constructors
public FloatArrowField()
Default parameterless constructor. No custom initialization is performed in this class; initialization is inherited from the base FloatField.
Methods
public override double ToFieldType(double4 value)
Converts the incoming double4 to the scalar type expected by the field by returning the X component (value.x). This method is the adapter point between vector-style input widgets and the scalar field representation.
Usage Example
// Example usage: converting a double4 arrow/vector to the field value (X component)
var arrowField = new FloatArrowField();
var input = new double4(1.5, -2.0, 0.0, 0.0);
double fieldValue = arrowField.ToFieldType(input); // returns 1.5
Notes: - The class uses double precision (double) for values; ensure callers expect/use double rather than float. - No clamping is applied here beyond the base class behavior; defaultMin/defaultMax are full-range by design. If you need bounds, override those properties or add validation in a derived class.