Skip to content

Show which room you are in

Updated

Two Audio Zones, a library with rain on its windows and a workshop with a drum loop: their enter and exit events name the room in a HUD label and lower the hall music.

With your sound on, hold A for half a second to walk into the library, or D to walk into the workshop. Inside a room you hear only its own sound, and the label names it. The rain and the beat are short loops generated for this example.

Show which room you are in

The script is explained step by step in Show which room you are in.

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.

RoomTracker.xrproj