Giving a Character footstep sounds

Footstep sounds are an effective - and simple - way to add atmosphere to your game.

With a character already made, use the Scene Manager to add a new Sound object to the scene:

Parent this new Sound to your character, and attach the Footstep Sounds component to it. It is available under Adventure Creator → Characters → Footstep sounds in the Add component menu:

At the top of this component's Inspector, click Surfaces window to bring up a window in which you can define all Surfaces within the game:

In this window, click Create new Surface to define at least one Surface. Give it a name, and assign your desired clips:

If multiple clips are assigned, they will be chosen randomly each time a sound is played. When multiple Surfaces are defined, the first will be used as the default.

Back in the Footstep Sounds component, assign its own GameObject as the Sound to play from, and the Character it's parented to as the Character:

The simply way to play these sounds is to set the Play sounds field to Automatically, which will cause them to play as the character moves. If this works for you, you're done!

A more involved method, though, is to set this to Via Animation Events, which causes the sounds to only be played when the component's PlayFootstep function is called. This is intended to be called from events in the character's animation, and allows you to precisely sync the sounds when the character's feet touch the ground.

For more on Animation Events, see Unity's documentation here. Just be aware that you'll need to move the Footstep Sounds component to the same GameObject as your character's Animator - though you can leave the Sound and AudioSource components where they are.

Either way, you'll probably want to have different sounds play when the character walks onto a different surface. This can be done by placing a Trigger over that surface, and using it to call the Sound: Change footsteps Action: