Class Fade
- Namespace
- UILib.Animations
- Assembly
- UILib.dll
A BaseEase behaviour which fades between two opacities.
public class Fade : BaseEase
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourFade
- 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.useGUILayoutBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.transformComponent.gameObjectComponent.tagObject.m_CachedPtrObject.OffsetOfInstanceIDInCPlusPlusObjectObject.objectIsNullMessageObject.cloneDestroyedMessageObject.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.nameObject.hideFlags
Properties
fadingIn
Whether this behaviour is currently fading in.
public bool fadingIn { get; }
Property Value
fadingOut
Whether this behaviour is currently fading out.
public bool fadingOut { get; }
Property Value
maxOpacity
The maximum opacity (0-1 inclusive).
public float maxOpacity { get; }
Property Value
minOpacity
The minimum opacity (0-1 inclusive).
public float minOpacity { get; }
Property Value
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
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
groupCanvasGroupThe canvas group to add
FadeIn(bool)
Fades the attached canvas groups in.
public void FadeIn(bool force = false)
Parameters
forceboolWhether to force fading in
FadeOut(bool)
Fades the attached canvas groups out.
public void FadeOut(bool force = false)
Parameters
forceboolWhether 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
SetOpacity(float)
Updates the opacity of all canvas groups.
public void SetOpacity(float opacity)
Parameters
opacityfloatThe new opacity to use
_SetValue(float)
Internally updates canvas opacity on each iteration.
protected override void _SetValue(float opacity)
Parameters
opacityfloatThe opacity to set