RUSTICDOCSSearch documentation

Scene environment

Read and change sky textures, ambient and sun lighting, and haze from every script language.

Feature status and language/platform compatibility

Choose an API to see its signature, parameters, examples and behavior.

APIs

Module guide

When to call it

Call during Start or a later gameplay callback. Attach a scene startup or object component script, and enable clouds with clouds_enabled. To use a panorama, copy it into the project before Play and enable the custom environment. See Sky & atmosphere for setup and accepted values.

Variables

VariableTypeRequiredDescription
settingspartial settings objectYesenabled, sky_image, sky_color, rotation_degrees, exposure, ambient_color, ambient_intensity, sun_color, sun_intensity, sun_direction, haze_color, haze_density, haze_start, sky_hidden, sky_procedural, clouds_enabled, cloud_coverage, cloud_density, cloud_altitude, cloud_thickness, cloud_scale. The time object accepts enabled, start_hour, cycle_seconds, sky_turns_per_day, night_image, sunrise_image and sunset_image. Omitted fields retain current values.
pathproject-relative stringYes2:1 HDR, PNG, JPEG or TGA panorama present in the play snapshot. Empty clears the image.
fieldsetting name (C)YesC reads/writes one typed field per call.

Return and timing

Live settings as a fresh object. Partial updates validate and commit atomically and return the resulting settings; C reads return RusticValue and C setters return void.

Constraints and behavior

  • Unknown settings and invalid values raise errors without mutating the environment. Exposure accepts -20 to 20. Cloud coverage accepts 0 to 1 and density accepts 0 to 4. Use the Inspector or see the settings table for world-unit ranges.
  • 3D scenes start with daylight and clouds off. Cloud controls work without enabling the custom environment. Set sky_hidden=true to hide both the sky and clouds.
  • setSkyTexture changes only the image; set enabled=true separately. The renderer checks the image on the next frame. The panorama does not generate image-based lighting or reflections.
  • Changes affect the running scene and do not save to the editor or appear in Apply Runtime Changes. Restart Play to restore authored settings.
  • Every gameplay language calls the engine-owned API. Rustic supplies SDKs and dispatches callbacks; scripts do not parse requests or serialize responses. See the language guide for complete setup and callback registration.