UxrCameraFade Class

Component added to a camera that allows to fade the rendered content to and from a color by using a fullscreen quad.

Inheritance Hierarchy

System.Object
  Object
    Component
      Behaviour
        MonoBehaviour
          UltimateXR.Core.Components.UxrComponent
            UltimateXR.Core.Components.UxrComponent(UxrCameraFade)
              UltimateXR.Core.Components.Composite.UxrAvatarComponent(UxrCameraFade)
                UltimateXR.CameraUtils.UxrCameraFade
Namespace: UltimateXR.CameraUtils
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public class UxrCameraFade : UxrAvatarComponent<UxrCameraFade>


The UxrCameraFade type exposes the following members.

Constructors

NameDescription
Public methodUxrCameraFade

Properties

NameDescription
Public propertyFadeColor Gets or sets the fade color used. The alpha is determined by the fade itself.
Public propertyIsFading Gets whether the component is currently fading.
Public propertyQuadLayer Gets or sets the layer value of the quad that is used to render the fade.

Methods

NameDescription
Protected methodAwake Initializes all internal data. (Overrides UxrAvatarComponent<T>.Awake().)
Public methodStatic memberCheckAddToCamera Checks if the given camera has a UxrCameraFade component. If not it is added to the camera.
Public methodDisableFadeColor Disables the camera fade rendering.
Public methodEnableFadeColor Enables the camera fade color. It will draw an overlay with the given color until DisableFadeColor() is called.
Public methodFadeAsync Starts a fade over time using an async operation.
Public methodStatic memberHasCameraFadeActive Checks if the given camera has a UxrCameraFade component and a fade is currently active.
Public methodStartFade(Single, Single, Color, Action, Action) Starts a fade over time on the camera that has this component. The camera will fade out to a given color and then fade in from that color again. For a coroutine-friendly way of fading check StartFadeCoroutine().
Public methodStatic memberStartFade(Camera, Single, Single, Color, Action, Action) Starts a fade over time on the given camera. The camera will fade out to a given color and then fade in from that color again. This is the static helper method that can be used to perform everything in just a single static call.
Public methodStartFadeCoroutine Coroutine that fades the screen over time. It can be used to be yielded externally from another coroutine. FadeAsync(CancellationToken, Single, Color, Color) is provided as the async alternative.

Extension Methods

NameDescription
Public Extension MethodCheckSetEnabled Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.)
Public Extension MethodGetOrAddComponent<T> Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.)
Public Extension MethodGetPathUnderScene Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.)
Public Extension MethodGetSceneUid Gets an unique identifier string for the given component. (Defined by ComponentExt.)
Public Extension MethodGetUniqueScenePath Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique. (Defined by ComponentExt.)
Public Extension MethodLoopCoroutine Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.)
Public Extension MethodSafeGetComponentInParent<T> Gets the Component of a given type in the GameObject or any of its parents. It also works on prefabs, where regular GetComponentInParent(Type, Boolean) will not work: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab (Defined by ComponentExt.)
Public Extension MethodShowInInspector(Boolean)Overloaded.
Controls whether to show the current object in the inspector. (Defined by ObjectExt.)
Public Extension MethodShowInInspector(Boolean, Boolean)Overloaded.
Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.)
Public Extension MethodThrowIfNull Throws an exception if the object is null. (Defined by ObjectExt.)

See Also

Reference

UltimateXR.CameraUtils Namespace