Table of Contents

Class Fade

Namespace
UILib.Animations
Assembly
UILib.dll

A BaseEase behaviour which fades between two opacities.

public class Fade : BaseEase
Inheritance
Object
Component
Behaviour
MonoBehaviour
Fade
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.Internal_CancelInvokeAll(MonoBehaviour)
MonoBehaviour.Internal_IsInvokingAll(MonoBehaviour)
MonoBehaviour.IsObjectMonoBehaviour(Object)
MonoBehaviour.StopCoroutineManaged(Coroutine)
MonoBehaviour.GetScriptClassName()
MonoBehaviour.useGUILayout
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.transform
Component.gameObject
Component.tag
Object.m_CachedPtr
Object.OffsetOfInstanceIDInCPlusPlusObject
Object.objectIsNullMessage
Object.cloneDestroyedMessage
Object.GetInstanceID()
Object.GetHashCode()
Object.CompareBaseObjects(Object, Object)
Object.EnsureRunningOnMainThread()
Object.IsNativeObjectAlive(Object)
Object.GetCachedPtr()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.GetOffsetOfInstanceIDInCPlusPlusObject()
Object.CurrentThreadIsMainThread()
Object.Internal_CloneSingle(Object)
Object.Internal_InstantiateSingle(Object, Vector3, Quaternion)
Object.Internal_InstantiateSingleWithParent(Object, Transform, Vector3, Quaternion)
Object.ToString(Object)
Object.GetName(Object)
Object.IsPersistent(Object)
Object.Internal_InstantiateSingle_Injected(Object, ref Vector3, ref Quaternion)
Object.Internal_InstantiateSingleWithParent_Injected(Object, Transform, ref Vector3, ref Quaternion)
Object.name
Object.hideFlags

Properties

fadingIn

Whether this behaviour is currently fading in.

public bool fadingIn { get; }

Property Value

bool

fadingOut

Whether this behaviour is currently fading out.

public bool fadingOut { get; }

Property Value

bool

maxOpacity

The maximum opacity (0-1 inclusive).

public float maxOpacity { get; }

Property Value

float

minOpacity

The minimum opacity (0-1 inclusive).

public float minOpacity { get; }

Property Value

float

onFadeIn

Invokes listeners once fading in finishes.

public UnityEvent onFadeIn { get; }

Property Value

UnityEvent

onFadeOut

Invokes listeners once fading out finishes.

public UnityEvent onFadeOut { get; }

Property Value

UnityEvent

opacity

The current opacity the canvas groups are set to.

public float opacity { get; }

Property Value

float

Methods

Add(CanvasGroup)

Adds a canvas group to be managed by this behaviour.

Adding the group to this behaviour will also immediately update its alpha value.

public void Add(CanvasGroup group)

Parameters

group CanvasGroup

The canvas group to add

FadeIn(bool)

Fades the attached canvas groups in.

public void FadeIn(bool force = false)

Parameters

force bool

Whether to force fading in

FadeOut(bool)

Fades the attached canvas groups out.

public void FadeOut(bool force = false)

Parameters

force bool

Whether to force fading out

OnEaseIn()

Runs when easing in has finished.

protected override void OnEaseIn()

OnEaseOut()

Runs when easing out has finished.

protected override void OnEaseOut()

SetOpacities(float, float)

Sets the opacities to fade between. These opacities must be between 0-1.

public void SetOpacities(float minOpacity, float maxOpacity)

Parameters

minOpacity float

The minimum opacity

maxOpacity float

The maximum opacity

SetOpacity(float)

Updates the opacity of all canvas groups.

public void SetOpacity(float opacity)

Parameters

opacity float

The new opacity to use

_SetValue(float)

Internally updates canvas opacity on each iteration.

protected override void _SetValue(float opacity)

Parameters

opacity float

The opacity to set