Class CanvasGroupTweenExtensions
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
Helpers for animating UnityEngine.CanvasGroup visibility based on selectable SelectionState.
public static class CanvasGroupTweenExtensions
- Inheritance
-
objectCanvasGroupTweenExtensions
Methods
SetState(SelectionState, SwappableCanvasGroup)
Fades UnityEngine.CanvasGroups inside swappableCanvasGroupe to reflect the given state.
public static IEnumerator SetState(SelectionState state, SwappableCanvasGroup swappableCanvasGroupe)
Parameters
stateSelectionStateTarget selection state to visualize.
swappableCanvasGroupeSwappableCanvasGroupContainer 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.