FadeUIElement

The FadeUIElement class manages the fading in and out of a VisualElement.

When fading a UIView, always use the public Fade variable provided by the UIView to ensure Actions work correctly. Typically, you should use this Fade rather than creating a custom instance.

Only create a custom Fade instance if you need to fade a VisualElement independently of UIView.

Constructor

public FadeUIElement(MonoBehaviour coroutineRunner, 
    VisualElement visualElement, 
    EasingMode easingMode = EasingMode.EaseOutCirc);
Name
Type
Description

coroutineRunner

MonoBehaviour

MonoBehaviour that handles running coroutines

visualElement

VisualElement

The VisualElement to be faded

EasingMode

EasingMode

The easing mode for transitions

Public Methods

FadeIn

public void FadeIn()

FadeOut

public void FadeOut()

SetDuration

public void SetDuration(float seconds)

SetEasing

public void SetEasing(EasingMode easingMode)

IsFadedIn

public bool IsFadedIn()

Last updated