Enum TrafficSignal
Enumerates the possible visual states of a simulation traffic light.
public enum TrafficSignal
Fields
| Name | Type | Description |
|---|---|---|
GREEN = 2 | The green light is on, indicating that traffic may proceed. | |
OFF = 0 | The signal is turned off and does not display any light. | |
RED = 1 | The red light is on, indicating that traffic must stop. | |
YELLOW = 3 | The yellow (amber) light is on, signaling that traffic should prepare to stop. |
Remarks
Each value maps directly to a local shader keyword on the traffic-light material
(e.g. _ACTIVESIGNAL_RED). This lets the GPU select the correct emissive colour
without a CPU-side texture swap, keeping state changes to a single EnableKeyword
call per frame. OFF disables all keywords, turning the light dark between
study scenarios or when the signal is not yet scripted.