Table of Contents

DOCounter Method

Namespace
DG.Tweening

DOCounter(Text, int, int, float, bool, CultureInfo)

public static TweenerCore<int, int, NoOptions> DOCounter(this UnityEngine.UI.Text target, int fromValue, int endValue, float duration, bool addThousandsSeparator = true, CultureInfo culture = null)

Tweens a Text's text from one integer to another, with options for thousands separators

Parameters

target Text
fromValue int

The value to start from

endValue int

The end value to reach

duration float

The duration of the tween

addThousandsSeparator bool

If TRUE (default) also adds thousands separators

culture CultureInfo

The CultureInfo to use (InvariantCulture if NULL)

Returns

TweenerCore<int, int, NoOptions>