Cloudscape Docs
View all packages

Weather

Lightning events

Run seeded storms with lightning flashes, strike events and an optional light.

Cloudscape 26.11.0Unity 6000.0+Built-in · URP · HDRP

Add Cloud Lightning and optionally assign a scene Light dedicated to lightning. Set the interval, flash duration and intensity range, then enable Start On Enable or call StartStorm(seed) during Play mode. Strike emits the elapsed storm time, peak intensity and duration for each event; listeners can trigger their own audio, particles or gameplay. The same seed, settings and elapsed time produce the same event sequence. The component advances using scaled game time, processing at most eight seconds of accumulated time per frame after a long pause. Advance also accepts explicit steps from zero through one second; avoid combining explicit steps with automatic updates unless both are intended. Split larger explicit steps into steps of at most one second.

The assigned light is disabled between flashes and fades linearly during a flash. Stopping or disabling the component restores the light's original enabled state and intensity if they still match the component's last values. An external change relinquishes light control until the storm is restarted; event emission continues. No light is required to receive events. Use a dedicated light and do not have multiple systems control it concurrently.

Clouds lit from inside

Assign a Cloud Layer to make each flash glow inside the clouds. Flashes are placed at a random point within Strike Radius of Strike Center (or of the Cloud Layer when no center is set), between 12 % and 50 % of the way up the layer. Cloud Glow Range, Cloud Glow Color and Cloud Glow Scale set how far, in what colour and how brightly the glow spreads; the glow is shaded through the cloud density, so dense cores bloom and thin edges stay dark. The same seed always places flashes at the same points. This works in URP, Built-in and HDRP.

While a flash is active it occupies a free local-light slot of that Cloud Layer, or the second slot if both are assigned. The layer's temporal history restarts at the start and end of each flash so the glow responds immediately.

Bolts and ground strikes

Ground Strike Chance sets how many flashes reach the ground. Strike events report CloudPosition, GroundPosition, HasPosition and ReachesGround, so you can place thunder audio, impacts or gameplay effects. Assign a Bolt Renderer (a Line Renderer with your own material and width) to draw a jagged bolt from the flash to the ground during cloud-to-ground strikes; the same seed draws the same bolt. The ground height is the strike center's height (or the Cloud Layer's) unless you clear Use Center Height For Ground and set Ground Height. Stopping the storm restores the Line Renderer's enabled state. FlashAmplitude gives the current flash brightness from 0 to 1 for your own effects.

Photosensitivity

Photosensitivity Safe is on by default and keeps flash starts at least a third of a second apart (at most three per second), following common guidance for photosensitive viewers. Turn it off only if your intervals are authored with that guidance in mind.

Still stuck?

Bring the sky with you.

Include the Cloudscape version, Unity and render-pipeline versions, operating system, graphics API, the Cloud Layer's camera setup inspection, relevant logs, and a minimal reproduction.

Email supportJoin Discord

Cloudscape 26.11.0

Search documentation