O'Reilly logo

Microsoft HoloLens Developer’s Guide by Dennis Vroegop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding spatial sound to GameObjects

We have set the default settings and applied import settings to the sounds we want to use. Now, we will finally make some noise. It is time to allow your objects in your game to be heard.

We have been working on the RockOn app, where we can place guitars in our scenes by looking at a point and making the air tap gesture. You may have chosen another instrument, but the principle remains the same.

We have added the sound we want to play to our assets and set the general audio settings to the correct values.

The Assets folder in our project has GuitarPrefab. This is the prefab we created earlier, the object that gets instantiated. If you select the prefab in the Assets folder, you can choose Add Component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required