Skip to content

Pause and resume music

Updated

Your first sound: background music on an Audio entity, and a radio that pauses and resumes it when clicked, with the source’s own events in the log.

With your sound on, click the radio to pause the music, and again to resume it.

Pause and resume music

The script is explained step by step in Pause and resume music.

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.

FirstSound.xrproj