Back to API Reference
Class

UnitAttribute

sealed
Inherits:Attribute

Declares the unit choices offered for a UnitValue / UnitVector2 parameter field, pipe-separated (e.g. "px|%|delta", "px|em"). Each entry is one of px, abs, %, em, delta, optionally with a slider range — em(0,4) for floats, abs[1,1000] for integers. The field's own value carries the authored default unit; this only sets which units the dropdown lists.

public string Units{ get }
[ctor]public UnitAttribute()