setSky.tool
This package holds more than this page lists. See all of its files in its world.
README.md
lighting.setSky
Set or reconfigure the scene's sky in one call, routed through the scene's explicit sky entity (ProceduralSky / Skybox components) so every change persists, replicates, and survives reload. Finds the scene's sky entity, creating a "sky" entity when the scene has none. A sky in force lights the scene, so a scene carrying the missing-lighting warning (nothing lights it) no longer carries it once a sky is set.
A preset word ("clear_day", "sunset", "sunrise", "overcast", "night") applies that look via a ProceduralSky component. "studio" is the solid gray sky (Skybox over sky_solid). "none" turns the sky off explicitly (Skybox with kind = "none"). Any other word is resolved against the project's materials FILTERED to sky-domain shaders (exact identity → leaf name → substring — the name finds, the shader decides) and the sky renders that material via a Skybox. Omit sky to reconfigure the current sky with opts only.
When the sky drawn now is an applied sky's backdrop (a sky asset, or a scene setup's sky member), a preset word and opts land on that backdrop as sky.setTimeOfDay lands an hour: on the owner that states each value, else as the backdrop's live value; a material word, "none" and opts.params are refused there, naming the asset.
opts.params edits a material sky's own parameters (discoverable via the get tool); editing a builtin material clones it into the world first and repoints the sky at the clone.