Unity Tanks Game Lesson 4 Add Audio Mixing - jasonweibel/HyperStream-Unity GitHub Wiki

Hyperstream : Unity Tanks Game - Lesson 4 - Add Audio Mixing

Enable Engine Audio Code

  1. Open TankMovement.cs file in Visual Studio

  2. Uncomment EngineAudio method on linew 83 - 108.

  3. Uncomment the call of the EngineAudio method on line 79.

  4. Uncomment the setting of the original pitch variable.

Enable Explosion Audio Code

  1. Open ShellExplosion.cs file in Visual Studio

  2. Uncomment line 62

Add Background Music

  1. Select GameManager

  2. Add Audio --> Audio Source component

  3. Change AudioClip to Background Music

  4. Change output to Music

  5. Check the Play On Awake checkbox

  6. Check the Loop checkbox

  7. Play game.

  8. Have students experiment with changing priority, volume, pitch, and other settings.

Finished Background Music Audio Source Component

Add Tank Engine Audio

  1. Select Tank Prefab

  2. Add Audio Source Component

  3. Set Audio Clip to EngineIdle

  4. Set ouput to Driving

  5. Check the Play On Awake and Loop check boxes

Finished Tank Engine Audio Source Component

Add Tank Impact Audio Component

Attachments:

image2017-8-11_14-55-34.png (image/png)
image2017-8-11_14-56-16.png (image/png)
image2017-8-11_14-56-38.png (image/png)
image2017-8-11_14-57-46.png (image/png)
image2017-8-11_14-59-6.png (image/png)
image2017-8-11_14-59-34.png (image/png)
image2017-8-11_15-0-11.png (image/png)
image2017-8-11_15-1-25.png (image/png)
image2017-8-11_15-1-59.png (image/png)
image2017-8-11_15-2-29.png (image/png)
image2017-8-11_15-3-12.png (image/png)
image2017-8-11_15-3-33.png (image/png)
image2017-8-11_15-4-10.png (image/png)