ToggleCameraDepth
A class in Root.Township, the global namespace.
A debug component on a camera that swaps its depth and render texture to alternate values when a key is pressed. The last one to wake is Instance.
- Listed in Global namespace: T to X
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
ToggleCameraDepth() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
Properties
| Member | What it is |
|---|---|
static ToggleCameraDepth Instance { get; private set; } | The most recently woken ToggleCameraDepth. |
Methods
| Member | What it is |
|---|---|
void Toggle() | Swaps the camera between its starting depth and texture and the alternate ones. |
2 private and internal methods
| Member | What it is |
|---|---|
private void Awake() | Sets Instance and records the camera's starting depth and target texture. |
private void Update() | Calls Toggle when toggleKey is pressed. |