UxrCanvasAlphaTween.FadeOut Method

Creates and starts a fade-out tweening animation for the alpha value of a CanvasGroup component. The alpha value will go from 1.0 to 0.0.

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

Syntax

C#

public static UxrCanvasAlphaTween FadeOut(
	CanvasGroup canvasGroup,
	float durationSeconds,
	float delaySeconds = 0f,
	Action<UxrTween> finishedCallback = null
)

Parameters

 

canvasGroup
Type: CanvasGroup
Target CanvasGroup
durationSeconds
Type: System.Single
Duration in seconds of the fade-in animation
delaySeconds (Optional)
Type: System.Single
Seconds to wait until the animation starts
finishedCallback (Optional)
Type: System.Action(UxrTween)
Optional callback when the animation finished

Return Value

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

See Also

Reference

UxrCanvasAlphaTween Class
UltimateXR.Animation.UI Namespace