The clock owns time progression and daylight evaluation. Layer colors, lighting and celestial artwork respond through their own configured components.
Clock settings#
The supplied UI has its own authored values. The 120-second cycle below is a guide exercise, not a required screenshot value.
| Field | Behavior |
|---|---|
| Hour | Zero midnight, six morning, twelve noon, eighteen evening; 24 wraps to zero. |
| Automatic / Paused | Enable progression / hold the current hour. |
| Full Day Duration / Time Scale | At 120 seconds and scale one, a cycle takes 120 seconds; scale two gives 60 seconds. |
| Sunrise / Sunset / Twilight | Guide example: 6 / 18 / 1 clock hour. Daylight fades around the boundaries. |
| Daylight Smoothing | Higher values respond faster; zero applies immediately. Try five for visual fading. |
clockHours / second = 24 / fullDayDuration * timeScaleAutomatic progression runs in Update when not paused. Scale zero stops it; negative scale runs backwards. Full Day Duration is in game seconds.
Curves and time ownership#
Use Unscaled Time makes clock progression/visual smoothing use real elapsed time while Time.timeScale = 0; it does not change every other effect's timing. Daylight Curve shapes the zero-to-one daylight response without changing clock speed.
When saved-game time or a transition owns the clock, disable Automatic or pause it. SetTime(hour, false) suppresses all events. SetTime uses the signed difference to the wrapped target; use AdvanceHours(3) to advance three hours across midnight.
Events#
| Event | Callback |
|---|---|
| Sunrise / Sunset | Configured boundary crossing. |
| Day / Night Started | Entry into a day/night phase. |
| Time Changed (Single) | Current hour as a float. |
In Advanced, add a UnityEvent listener, assign the scene callback object and choose its public method. For Time Changed, use Dynamic float; static float sends a fixed value. Test crossing sunrise/sunset in Play Mode. Boundary events fire at most once per update, even for multi-day skips.
GuideClockEvents shows paired C# subscriptions. Turning Automatic off and changing Hour alone does not recolor artwork; enable Environment colors.