Back to API Reference
Struct

UnitValue

sealed
Implements:IEquatable<UnitValue>

A numeric parameter value paired with the unit it is expressed in — the serialized form of a unit token (24, 150%, 0.5em, +10). Used as a modifier field type so the authoring default carries both number and unit in one place.

[ctor]public UnitValue()
public static UnitValue Absolute()
public static UnitValue Percent()
public static UnitValue Em()
public static UnitValue Delta()
public float ResolvePx()

Resolves to pixels against emSize (the font size): em multiplies, absolute/delta pass through.

public static float ResolvePx()

Loose value/unit overload for values read via ParameterReader.NextUnitFloat.

public bool Equals()
public override bool Equals()
public override int GetHashCode()
public float value
public UnitKind unit