SpectralMaterialTransition
A class in Root.Township, the global namespace.
Client visual that swaps a set of renderers between their normal materials and a spectral (ghost) look, with materialize, fade and crack shader animations. Does nothing on headless servers.
- Listed in Global namespace: S
- Inherits or implements
MonoBehaviour,IBuildRendererPostBake,IBuildBakeable - Nested types
Animator
Constructors
| Member | What it is |
|---|---|
SpectralMaterialTransition() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
16 private and internal fields
| Member | What it is |
|---|---|
private SpectralMaterialTransition.Animator[] animators | One material animator per distinct original material. |
private float crackDuration | Seconds the crack animation takes. |
private float crackProgress | Current crack progress, 0 to 1. |
private IUnityUpdateMethod cracksUpdate | Handle of the crack update. |
private float fadeDuration | Seconds a fade takes. |
private float fadeProgress | Current fade-out progress, 0 to 1. |
private IUnityUpdateMethod fadeUpdate | Handle of the fade update. |
private bool isFading | Set by FadeOut; stops further materialize changes. |
private bool isFadingInOnStart | Fades in when the object wakes. |
private bool isMaterialized | Whether the object is, or is heading to, its solid look. Also the starting state. |
private float progress | Backing field for MaterializationProgress. |
private Material spectralMaterial | Base ghost material, copied per original with its texture as cutout. |
private Renderer[] targetRenderers | Renderers whose materials are swapped. |
private float transitionDuration | Seconds a materialize or dematerialize takes. |
private Material transitionMaterial | Base material used while animating, copied per original. |
private IUnityUpdateMethod transitionUpdate | Handle of the materialize update. |