Blog: Game Audio Scripting With Unity - Part 1

US Game audio development platform revealed      03/03/14

Getting Started

Let's start by importing a couple sounds: a music piece and a sound effect. Drag a few WAV files into the Assets pane at the bottom of the UI (or right click in the pane and choose "Import New Asset".)

Observe the default values shown in the properties Inspector:

There are a few things we can adjust here, but for now the only one we'll be looking at is the "3D sound" setting. This determines whether the sound is a 3D sound or a 2D sound.

  • 2D sound: this is what you'd be most used to from working with in a DAW--a sound that can be panned left and right, or raised or lowered in velocity. 2D sounds play at the same velocity and panning regardless of where they're played relative to the Audio Listener, therefore they're best suited to UI sounds or music.
  • 3D sound: conversely, 3D sounds have a sense of space. So in addition to be panned left or right they can be panned "back and forward" or "up and down". The engine takes care of all of this by looking at the position of the Audio Source in 3D space relative to the position of the Audio Listener.

In the example above I've imported music, so I'm going to uncheck the 3D sound checkbox and click the Apply button. Let's also import a sound effect but leave the 3D sound checkbox checked.

You should now have two audio assets:

Try dragging them both into the Hierarchy and watch what happens:





More From: UNITY
Even more news...


 

Want Our Newsletter?



More...

And more


Pittsburgh Modular's latest release


Raspberry PI5 Hardware VST Host 

Floyd Steinberg gets the gear together


5 Firmware Updates that Totally Changed the Game 

Revisions that turned synths into brand new machines


Moog At The Super Bowl 

The Avila Brothers talk about their journey to the recent Super Bowl Halftime Show


Sega sound for now


Hey there, we use Cookies to customize your experience on Sonicstate.com