Will fade-in / fade-out the screen to a given color on command. NOTE: The color will only be faded for the main camera (Camera.main). If you want it to run for all cameras or different ones, inherit from this object and adjust the OnPostRenderCallback function. More...
Public Member Functions | |
override void | StartEffect () |
Start the effect More... | |
override void | EndEffect () |
End the effect More... | |
override void | StartEndEffect () |
Start the effect and automatically end it right after More... | |
override bool | isBusy () |
True if the effect is starting/started or ending but not yet ended. More... | |
Public Member Functions inherited from AVR.Core.AVR_Behaviour | |
virtual void | OnDestroy () |
Public Attributes | |
Material | fadeMaterial |
Material we fade to. Leave this blank for a uniform color. More... | |
Color | overlayColor |
Value of the "_Color" component of the materials shader. More... | |
float | start_value = 0.0f |
Starting alpha value of the color More... | |
float | end_value = 1.0f |
Ending alpha value of the color More... | |
float | fade_in_duration = 0.5f |
Time for fade-in effect to conclude. More... | |
float | fade_out_duration = 0.5f |
Time for fade-out effect to conclude. More... | |
Protected Member Functions | |
virtual void | Awake () |
virtual void | OnEnable () |
virtual void | OnDisable () |
virtual void | Update () |
virtual void | OnPostRenderCallback (Camera cam) |
Private Attributes | |
float | stime = 0.0f |
bool | do_fade_in = false |
bool | do_fade_out = false |
Additional Inherited Members | |
Protected Attributes inherited from AVR.Core.AVR_Behaviour | |
AVR_PlayerRig | playerRig => AVR_PlayerRig.Instance |
The current AVR_PlayerRig instance in the scene More... | |
AVR_Root | root => AVR_Root.Instance |
The current AVR_Root instance in the scene More... | |
bool | vrEnabled => UnityEngine.XR.XRSettings.enabled |
True if the application is running as a VR/XR application More... | |
Will fade-in / fade-out the screen to a given color on command. NOTE: The color will only be faded for the main camera (Camera.main). If you want it to run for all cameras or different ones, inherit from this object and adjust the OnPostRenderCallback function.
Definition at line 11 of file AVR_CameraFade.cs.