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
Name | Description | |
---|---|---|
![]() | UxrCameraFade |
Properties
Name | Description | |
---|---|---|
![]() | FadeColor | Gets or sets the fade color used. The alpha is determined by the fade itself. |
![]() | IsFading | Gets whether the component is currently fading. |
![]() | QuadLayer | Gets or sets the layer value of the quad that is used to render the fade. |
Methods
Name | Description | |
---|---|---|
![]() | Awake | Initializes all internal data. (Overrides UxrAvatarComponent<T>.Awake().) |
![]() ![]() | CheckAddToCamera | Checks if the given camera has a UxrCameraFade component. If not it is added to the camera. |
![]() | DisableFadeColor | Disables the camera fade rendering. |
![]() | EnableFadeColor | Enables the camera fade color. It will draw an overlay with the given color until DisableFadeColor() is called. |
![]() | FadeAsync | Starts a fade over time using an async operation. |
![]() ![]() | HasCameraFadeActive | Checks if the given camera has a UxrCameraFade component and a fade is currently active. |
![]() | StartFade(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(). |
![]() ![]() | StartFade(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. |
![]() | StartFadeCoroutine | 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
Name | Description | |
---|---|---|
![]() | CheckSetEnabled | Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.) |
![]() | GetOrAddComponent<T> | Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.) |
![]() | GetPathUnderScene | Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.) |
![]() | GetSceneUid | Gets an unique identifier string for the given component. (Defined by ComponentExt.) |
![]() | GetUniqueScenePath | 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.) |
![]() | LoopCoroutine | Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.) |
![]() | SafeGetComponentInParent<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.) |
![]() | ShowInInspector(Boolean) | Overloaded. Controls whether to show the current object in the inspector. (Defined by ObjectExt.) |
![]() | ShowInInspector(Boolean, Boolean) | Overloaded. Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.) |
![]() | ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |