Skip to content

A click sound for any button

Updated

Every button of a menu plays the same short click, rewound on each press so fast presses all sound: one Audio entity with autoplay off, played by a Behavior script on a shared signal.

Press the buttons, quickly too. Drag to orbit the camera, scroll to zoom. The click is a tiny sound generated for this example.

A click sound for any button

The script is explained step by step in A click sound for any button.

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.

ButtonClickSound.xrproj