UxrTextContentTween.Animate Method (GameObject, UxrInterpolationSettings, Action(UxrTween), String, Object[])

Creates and starts a tweening animation for a Unity UI Text component or TMPro text component. See UxrInterpolator.InterpolateText for information on how formatString and formatStringArgs work.

Namespace: UltimateXR.Animation.UI
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static UxrTextContentTween Animate(
	GameObject gameObject,
	UxrInterpolationSettings settings,
	Action<UxrTween> finishedCallback,
	string formatString,
	Object[] formatStringArgs
)

Parameters

 

gameObject
Type: GameObject
Target GameObject with either a Unity UI Text component or Text Mesh Pro text component
settings
Type: UltimateXR.Animation.Interpolation.UxrInterpolationSettings
Interpolation settings that control the animation
finishedCallback
Type: System.Action(UxrTween)
Optional callback when the animation finished. Use null to ignore.
formatString
Type: System.String
Format string. See UxrInterpolator.InterpolateText
formatStringArgs
Type: System.Object[]
Format string arguments. See UxrInterpolator.InterpolateText

Return Value

Type: UxrTextContentTween
Tweening component that will update itself automatically. Can be used to stop the animation prematurely or change parameters on the fly.

See Also

Reference

UxrTextContentTween Class
Animate Overload
UltimateXR.Animation.UI Namespace