Back to API Reference
Class

FloatingLabelDecorator

sealed

Animates a label between its resting position (inside the field) and a floated position (typically the top edge), scaling it down on the way; the label stays visible throughout. For a different motion model — a tween library, a path — write your own FieldDecorator.

public UniTextBase Label{ get; set }

Label whose authored transform is the resting pose.

public RectTransform FloatedTo{ get; set }

Transform whose position defines the floated pose.

public float FloatedScale{ get; set }

Label scale in the floated pose relative to its resting scale.

public float Duration{ get; set }

Transition duration in seconds; zero applies the target pose immediately.

public AnimationCurve Easing{ get; set }

Curve mapping normalized transition progress to pose interpolation.

protected override void OnAttach()
protected override void OnDetach()
protected override void OnFieldState()
protected override void OnTick()