Skip to content

Fade a light in and out

Updated

A script under a spot light tweens its intensity down to 0 and back up to 3, two seconds each way, for as long as it runs.

Watch the spot fade out and back in. Drag to orbit the camera, scroll to zoom.

Fade a light in and out

The script is explained step by step in Fade a light in and out.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

FadeLight.xrproj