Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

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 — this is also how a scene carrying the missing-sky warning heals.

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.

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.