Skip to main content

Class TrafficSignalTrack

A custom Unity Timeline track that drives a traffic light through a designer-authored sequence of signal phases (red, yellow, green, flashing) represented as TrafficSignalClips.

public class TrafficSignalTrack : TrackAsset

Inheritance​

TrackAsset→TrafficSignalTrack

Remarks​

This track exists so that intersection scenarios can be configured entirely in Unity's Timeline window without code changes — each phase is a draggable clip whose duration sets the dwell time. Binding a TrafficSignalController to the track connects the authored sequence to a specific light in the scene. Multiple tracks on one Timeline asset can control multiple lights in sync, enabling complex multi-phase intersection choreography.

Methods​

CreateTrackMixer(PlayableGraph, GameObject, int)​

Creates the track-level mixer which receives all the playable behaviors generated by the clips.

public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)

Parameters​

NameTypeDescription
graphPlayableGraph
goGameObject
inputCountint

Returns​

Playable — A handle to the TrafficSignalMixer.