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, copy panoramas into the project before Play, and enable the environment. See Sky & atmosphere for complete setup and all 13 fields.

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. 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 is limited to [-20,20]; colors/intensities/distances must be finite and non-negative; sun direction must be finite and nonzero.
  • 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.