Footsteps using Animation Files with Unity and Wwise
Several Scripts are needed.
STEP 1: Create a footsteps manager that can detect floor materials, in this example Ray Casting is used. Ray Casting can be deactivated with a boolean and a condition in order to optimize resources.
STEP2:In this example, ray casting method uses Tags to detect materials.
STEP3: Wwise Switches can be referenced inside a Scriptable Object, technica; and audio designers can modify references in scriptable objects.
STEP4: Once the Wwise Switch is selected, we can create a method to post the event at character position.
STEP5: Animation files are used in order to trigger footsteps sound in perfect sync with the visual rendering, this technique only works if there is an animation used in the characters.