Table of Contents

Class CanvasGroupTweenExtensions

Namespace
Fallencake.UI
Assembly
Fallencake.UI.dll

Helpers for animating UnityEngine.CanvasGroup visibility based on selectable SelectionState.

public static class CanvasGroupTweenExtensions
Inheritance
object
CanvasGroupTweenExtensions

Methods

SetState(SelectionState, SwappableCanvasGroup)

Fades UnityEngine.CanvasGroups inside swappableCanvasGroupe to reflect the given state.

public static IEnumerator SetState(SelectionState state, SwappableCanvasGroup swappableCanvasGroupe)

Parameters

state SelectionState

Target selection state to visualize.

swappableCanvasGroupe SwappableCanvasGroup

Container with per-state UnityEngine.CanvasGroups and fade settings.

Returns

IEnumerator

Coroutine enumerator that performs the tween over time.

Remarks

Activates only the relevant groups and interpolates alpha from current values to 1 for the active state and to 0 for the inactive states over FadeDuration.