Unit

[Unit] draws a compact unit label inside a numeric field.
[Unit(m)] _Distance ("Distance", Float) = 2
[Unit(deg)] _Angle ("Angle", Float) = 45
Syntax
[Unit(label)]
Behavior
- Works best on
FloatandRangeproperties. - The unit is visual only. It does not convert values.
- Use short labels so the field remains readable in narrow inspectors.
Example
Properties
{
[Group(Motion)] [Unit(m/s)] _Speed ("Speed", Float) = 3
[Group(Motion)] [Unit(deg)] _Rotation ("Rotation", Range(0, 360)) = 90
}