Common Blueprint Setup
- Place SkyBox Time of Day Actor in the level.
- In your Level Blueprint, Game Mode, or manager Blueprint, create a variable that references the placed sky actor.
- Use the Blueprint functions below to change time, query sun/moon direction, or force visual updates.
- If you drive time yourself, call Set Time Of Day instead of directly setting the variable.
Blueprint Functions
| Function | Use It For |
|---|---|
| Set Time Of Day | Set the current time directly. Useful for clocks, sleep systems, menu sliders, or scripted scenes. |
| Get Sun Direction | Read the sun direction vector for gameplay, material effects, AI, or VFX. |
| Get Sun Elevation | Read how high the sun is above or below the horizon. |
| Get Sun Azimuth | Read the horizontal direction of the sun around the level. |
| Get Moon Direction | Read the moon direction vector. |
| Get Moon Elevation | Read how high the moon is above or below the horizon. |
| Is Moon Visible | Check whether the moon should currently be visible in the sky. |
| Update Sky | Force all sky, lighting, fog, post process, and material values to refresh. |
| Recapture Sky Light | Manually refresh the sky light capture. |
| Apply Planet Preset | Switch to a planet preset from Blueprint. |
| Get Active Planet Config | Read the currently active planet settings. |
| Set Aggressive Optimization | Turn reduced material updating on or off at runtime. |
| Set Update Frequency | Change how often visual updates are applied. |
Example: Time Slider In A Widget
- Create a Widget Blueprint with a slider.
- Set the slider range to match your day length. For the default setup, use 0 to 24.
- On slider value changed, call Set Time Of Day on your sky actor reference.
- After big changes, call Update Sky if you need an immediate refresh.
Example: Different Planet At Runtime
- Enable Generic Celestial System on the sky actor.
- Call Apply Planet Preset and choose the preset you want.
- Set Time Of Day to a valid hour for that planet day length.
- Call Update Sky to refresh the scene.