Game Development Reference
In-Depth Information
Figure 11-8. The Audio Listener component has no properties to display in the Inspector
It works as-is to receive or “hear” input from any Audio Sources in the game scene, then play the
sound through the game platform speakers. Depending on the game needs, the Audio Listener
might instead be attached to the main player character or some other game object, but then it must
be removed from the Main Camera because only one Audio Listener component can be present in
each scene.
Audio Source
The Audio Source is the game object component responsible for playing the sound. In the Project
panel open the Assets ➤ Prefabs folder and expand the Land Mine prefab to reveal the Explosion
icon. Select Explosion to display its Audio Source in the Inspector (Figure 11-9 ).
 
Search WWH ::




Custom Search