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 UI 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
Name | Type | Description |
---|---|---|
coroutineRunner | MonoBehaviour | MonoBehaviour that handles running coroutines. |
visualElement | VisualElement | The VisualElement to be faded. |
easingMode | EasingMode | Defines the easing effect applied during fade transitions. |
debug | bool | Logs fade transitions. |
Public Methods
FadeIn
FadeOut
SetDuration
GetDuration
Returns the predefined duration of fade transitions. Note that it does not reflect the current active transition duration.