Footstep Sounds

Note:This feature requires Physics3d to be installed in your project. Use the Welcome Window to enable it if you haven't yet.

 
Footstep Sounds is a more compact and focused version of Event Sounds, focused on playing different sounds for different collision / triggers on the same game object, based on layer or tag. Event Sounds does not allow you to play a different sound for a different tag or layer unless you add a new Event Sounds script for each tag or layer, so it's unwieldy for that purpose.
 
Add this script to a game object from the menu: Component -> Dark Tonic -> Master Audio -> Footstep Sounds.

 

 

The image above shows Footstep Sounds set up with 1 Sound for Collision events. The following controls appear here:

  1. Sound Spawn Mode: This has 2 different choices.
       
    • Caller Location: This will trigger Sound Groups from this game object's position.
    •  
    • Attach To Caller: The default. This will not actually reparent the Variation game object, but it will follow the location of the game object that has the Event Sounds script. This way sounds won't get cut off or Variation objects destroyed when things despawn or get destroyed by Scene changes.
  2.  
  3. Event Used: This dropdown defaults to None, which will not play any sounds or allow you to configure any. You can change it to Trigger Enter, Collision Enter, or their 2D equivalents. Then the rest of the controls will show up underneath.
  4.  
  5. Retrigger Limit Mode: Works the same as the Sound Group setting Replay Limit Mode.
  6.  
  7. Buttons up top::
       
    • Add Footstep Sound: Add a new Footstep Sound to the grid below.
    •  
    • Delete Footstep Sound: Deleted the last Footstep Sound in the grid below.
    •  
    • Collapse / Expand All: Collapse or Expand all Footstep Sounds in the grid below.

Each Footstep Sound has the following settings:
     
  1. Layer / Tag Filters: Works the same as Event Sounds.
  2.  
  3. Action Type: Choose either "Play Sound Group" (the default) or "Invoke Parameter Command".
       
    • Play Sound Group fields
       
      • Sound Group / Variation Mode / Volume / Override pitch / Delay Sound: These work the same as Event Sounds.
    •  
    • Invoke Parameter Command fields