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:


Send us your News: If you have a story or product you'd like us to cover - email news@sonicstate.com or use our contact form or join our Discord and post in #cool-finds


Get the latest headlines, offers and more in our lit sonicstate newsletter - delivered to your in box every week

More From: UNITY
Even more news...


 

Get Our Newsletter


More...

SonicLAB: Genki Katla With Venus Theory 

We look at the volcanic synth


Lifeforms SV-2 - Pittsburgh Modular's Redesigned Semi-Modular 

SV-1 successor with thru-zero FM


SonicLAB: Pittsburgh Modular Lifeforms SV-2 

Classy analogue synth reviewed


AmiGUS mini: 24-bit Sound for Amiga 1200 & 600 

32 Channel PCMCIA Soundcard in Beta


SonicLAB: Lambda Synthetics Polypulse 

Algorithmic Performance Workstation


Will Vintage Gear become Liquidated E-Waste? 

Geopolitics, CRTs, Antique Computers & Vintage Synths