Skip to main content

Enum TrafficSignal

Enumerates the possible visual states of a simulation traffic light.

public enum TrafficSignal

Fields​

NameTypeDescription
GREEN = 2The green light is on, indicating that traffic may proceed.
OFF = 0The signal is turned off and does not display any light.
RED = 1The red light is on, indicating that traffic must stop.
YELLOW = 3The 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.