Skip to content

Cycle a preset's variants on click

Updated

Each click on the orb applies the next variant of its Holo Foil preset, writing the variant’s values into the props and uniforms.

Click the orb to step through the variants of its shader. Drag to orbit the camera, scroll to zoom.

Cycle a preset's variants on click

The script is explained step by step in Cycle a preset’s variants on click.

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.

VariantCycle.xrproj