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

Creates and starts a tweening animation for a Unity UI Text component or TMPro text component.

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

Syntax

C#

public static UxrTextContentTween Animate(
	GameObject gameObject,
	string startText,
	string endText,
	UxrInterpolationSettings settings,
	Action<UxrTween> finishedCallback = null
)

Parameters

 

gameObject
Type: GameObject
Target GameObject with either a Unity UI Text component or Text Mesh Pro text component
startText
Type: System.String
Start text
endText
Type: System.String
End text
settings
Type: UltimateXR.Animation.Interpolation.UxrInterpolationSettings
Interpolation settings that control the animation
finishedCallback (Optional)
Type: System.Action(UxrTween)
Optional callback when the animation finished

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