Footsteps Sounds in Unity3D C# code example

This was my attempt to implement footsteps sounds in Unity 3D which I did use to test my sounds (it was used, inter alia, here /footsteps-in-unity3d/) some time ago. If you need some easy example, then it may help you. Or else. It is written in C# in Unity3D 4.x but it is still works with Unity 5.x. It uses Resources.Load which maybe isn’t the most efficient way of loading sounds to the memory but it is an easy one. It works with default First Person Controller. The script supports switching footsteps type based on splatmap detection and object collision.

To contains two scripts footstepsSound.cs and footstepsSoundClass.cs.  In order to work you need to creat it into your project and attach footstepsSound.cs script to First Person Controller. Continue reading “Footsteps Sounds in Unity3D C# code example”