ExposurePlayerScreenFader
A class in Root.Township, the global namespace.
Client screen fader that fades to black by lowering post-process exposure, and shortens the camera far plane while fully dark. Also does camera-flash effects.
- Listed in Global namespace: E to H
- Inherits or implements
PlayerScreenFader
Constructors
| Member | What it is |
|---|---|
ExposurePlayerScreenFader() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
Methods
8 private and internal methods
| Member | What it is |
|---|---|
private void Awake() | Remembers the camera's normal far clip distance. |
private IEnumerator DelayFlash(float flashDuration, float flashFadeoutDuration, float flashExposure) (iterator) | Sets the flash exposure, holds it, then fades back. |
private IEnumerator LerpExposure(float duration, float alphaStart, float alphaEnd, float exposure) (iterator) | Coroutine that moves exposure between fade levels over a duration. |
private void OnDestroy() | Unsubscribes from the post-process controller's ValuesChanged, though it subscribed to ValuesReset. |
private void OnDestroyByScene(NetworkEntity entity, bool isUnload) | Unsubscribes and stops the current fade. |
private void OnPostProcessValuesReset() | Reapplies a locked fade and sets the far clip to match the current exposure. |
private void SetExposure(float targetExposure) | Sets exposure, switching the far clip plane when crossing full dark. |
private void Start() | Off headless servers, hooks the destroy and post-process reset events and applies the current state. |