Please be advised that the Audiokinetic offices will close at 3:00 p.m. EST on December 23rd, 2019 for the holiday period, and will reopen on January 3rd, 2020 at 9:00 a.m. EST. Learn more.

Lesson 4

Table of Contents

Posting Events from a Script

Using the AkEvent and the AkAmbient scripts, you've learned how to integrate audio on to game objects in the Unity Inspector. This approach is super fast and simple to use as the predefined properties and options are already there to satisfy the most common applications. However, most Unity games will have at least a few custom-made scripts for special systems like Player footsteps, where the sound needs to be connected to a point in an animation or needs additional information before being called. If you are not used to writing scripts, fear not. Follow a few instructions and, even without any prior Unity script knowledge, you'll quickly learn the ins and outs. Once you've got the hang of it, you might even prefer integrating all sounds by script, as you will have that additional level of control over its behavior in later stages of your game development.