Class DoubleField
Makes a text field for entering doubles.
Inheritance
DoubleField
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public class DoubleField : TextValueField<double>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<double>, IMixedValueSupport, IValueField<double>
Constructors
DoubleField()
Constructor.
Declaration
public DoubleField()
DoubleField(Int32)
Constructor.
Declaration
public DoubleField(int maxLength)
Parameters
Type | Name | Description |
---|---|---|
Int32 | maxLength | Maximum number of characters the field can take. |
DoubleField(String, Int32)
Constructor.
Declaration
public DoubleField(string label, int maxLength = null)
Parameters
Type | Name | Description |
---|---|---|
String | label | |
Int32 | maxLength | Maximum number of characters the field can take. |
Fields
inputUssClassName
USS class name of input elements in elements of this type.
Declaration
public static readonly string inputUssClassName
Field Value
Type | Description |
---|---|
String |
labelUssClassName
USS class name of labels in elements of this type.
Declaration
public static readonly string labelUssClassName
Field Value
Type | Description |
---|---|
String |
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Methods
ApplyInputDeviceDelta(Vector3, DeltaSpeed, Double)
Modify the value using a 3D delta and a speed, typically coming from an input device.
Declaration
public override void ApplyInputDeviceDelta(Vector3 delta, DeltaSpeed speed, double startValue)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | delta | A vector used to compute the value change. |
DeltaSpeed | speed | A multiplier for the value change. |
Double | startValue | The start value. |
Overrides
UnityEditor.UIElements.TextValueField<System.Double>.ApplyInputDeviceDelta(Vector3, UnityEditor.UIElements.DeltaSpeed, System.Double)
StringToValue(String)
Converts a string to a double.
Declaration
protected override double StringToValue(string str)
Parameters
Type | Name | Description |
---|---|---|
String | str | The string to convert. |
Returns
Type | Description |
---|---|
Double | The double parsed from the string. |
Overrides
UnityEngine.UIElements.TextInputBaseField<System.Double>.StringToValue(System.String)
ValueToString(Double)
Converts the given double to a string.
Declaration
protected override string ValueToString(double v)
Parameters
Type | Name | Description |
---|---|---|
Double | v | The double to be converted to string. |
Returns
Type | Description |
---|---|
String | The double as string. |
Overrides
UnityEngine.UIElements.TextInputBaseField<System.Double>.ValueToString(System.Double)