MaterialToggler
A class in Root.Township, the global namespace.
Debug tool: Shift+M swaps materials on spawned objects (those using an aFrom material) to to, then puts them back in two timed steps. Probably for checking which objects use which materials.
- Listed in Global namespace: M to O
- Inherits or implements
MonoBehaviour - Nested types
RendererToMaterial
Constructors
| Member | What it is |
|---|---|
MaterialToggler() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|---|
static MaterialToggler instance | The first MaterialToggler. |
9 private and internal fields
| Member | What it is |
|---|---|
private List<Material> aFrom | Materials that get swapped to to. |
private List<Material> bFrom | Materials that stay swapped after the second step. |
private MeshRenderer[] foundRenderers | Renderers found under the spawned objects folder by ChangeA. |
private IKeyBoardTriggerHandler keyboardHandler | Handle of the M key registration. |
private List<MaterialToggler.RendererToMaterial> renderersToToggle | Swapped renderers and their original materials. |
private AltaCoroutine running | The running ProceedChanges coroutine. |
private Texture[] textures | Textures UpdateMipMapBias changes. |
private Material to | Material put on during the swap. |
private float waitDuration | Seconds between steps. |