SoundTrigger
The SoundTrigger component can be used to easily play sounds without code

SoundTrigger is a component used for easily playing/stopping SoundEvents on callbacks built into Unity like Enable, Disable, OnCollisionEnter etc. They contain SoundEvents with modifiers and triggers which decide when it should play or stop. SoundTriggers also have a radius handle, which is visually editable in the scene viewport for easy adjustment of how far SoundEvents should be heard. All SoundTrigger components are multi-object editable.

Distance Radius Distance of the SoundEvent (how far it should be heard).
Modifiers Modifiers are used to control how SoundEvents are played (e.g. volume, polyphony, fade in length etc). See modifiers for more info.
Triggers
Using the triggers you can select when an action happens.

On Trigger and On Collision - Tag If enabled, the SoundEvent will only play if the triggering object has a tag matching the selected tags.
On Collision - Velocity to Intensity If enabled, the velocity magnitude will be passed as an intensity parameter.
Actions
For each trigger you can select what it should do to the SoundEvent.

Custom Override
You can override the functionality and editor of the SoundTrigger and extend it with custom functionality.
Example result:

Create these scripts to get started:
Last updated