UxrColorTween.AnimateBlinkAlpha Method

Creates and starts an alpha blinking tweening animation for the color of a Unity UI component.

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

Syntax

C#

public static UxrColorTween AnimateBlinkAlpha(
	Graphic graphic,
	float blinksPerSecond,
	float durationSeconds,
	float delaySeconds = 0f,
	bool restoreWhenFinished = true,
	Action<UxrTween> finishedCallback = null
)

Parameters

 

graphic
Type: Graphic
Target graphic
blinksPerSecond
Type: System.Single
Number of blinks per second
durationSeconds
Type: System.Single
Total duration of the animation in seconds
delaySeconds (Optional)
Type: System.Single
restoreWhenFinished (Optional)
Type: System.Boolean
Whether to restore the original color after the animation finished
finishedCallback (Optional)
Type: System.Action(UxrTween)
Optional callback when the animation finished

Return Value

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

See Also

Reference

UxrColorTween Class
UltimateXR.Animation.UI Namespace