Transition numeric environment values while giving each value one owner. Automatic clock progression or a cloud tint controller can otherwise compete with the transition.
Start and finish a transition#
Add Parallax2DTransition, assign its Manager and create an Environment Preset with unique matching layer names. GuideTransition demonstrates three seconds to night while saving/restoring the clock's Automatic flag.
| Setting | TransitionTo behavior |
|---|---|
| Factor / Offset / Tint | Interpolate numeric values on name-matched layers. |
| Hour | Shortest path around the clock; intermediate SetTime calls suppress events. Stop automatic clock progression first. |
| Ambient multiplier | Smooth color blend; ambient/sky gradient assets themselves are not tweened. |
| Wind / Fog / Cloud velocity | First matching components, not every independent effect entry. |
| Discrete settings false | Default; do not apply gradients, loop axes, sorting, visibility or day duration. |
| Discrete settings true | Apply destination preset on completion, including its clock SetTime event behavior. |
| Sprite references / transforms | Do not swap existing art, create hierarchies/colliders or tween artwork transforms. |
| New transition / Cancel | Start from current values; Cancel stops there instead of restoring original values. |
Resolve ownership conflicts#
Cloud controllers rewrite layer.tint; a transition or gameplay script may target the same field. Plan that layer's color ownership explicitly. Automatic clocks, timelines and gameplay writers also need coordination.
Pause-screen timing#
transition.useUnscaledTime = true;
// If clock-controlled visual fades must also run while paused:
clock.useUnscaledTime = true;Unscaled transition progress does not switch every effect/drift to unscaled time. Other controllers, including tint smoothing, use their own timing. Test the intended paused presentation.
Start a transition, cancel/replace it halfway and confirm the replacement starts at the current state without reverting to the original preset.