UxrScaleTween.Animate Method

Creates and starts a scale tweening animation for the [!:RectTransform.localScale] of a Unity UI Graphic component.

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

Syntax

C#

public static UxrScaleTween Animate(
	Graphic graphic,
	Vector3 startScale,
	Vector3 endScale,
	UxrInterpolationSettings settings,
	Action<UxrTween> finishedCallback = null
)

Parameters

 

graphic
Type: Graphic
Target graphic
startScale
Type: Vector3
Start local scale
endScale
Type: Vector3
End local scale
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: UxrScaleTween
Tweening component that will update itself automatically. Can be used to stop the animation prematurely or change parameters on the fly.

See Also

Reference

UxrScaleTween Class
UltimateXR.Animation.UI Namespace