Sound Effect (SFX)

The SFX component is a scriptable object for playing sound effects. It can be used to easily create and play randomized sound effects.

Spatial SFX component

Properties

PropertyFunction
Sound CategoryDetermine which audio group the sound is in. This will be used to allow users to modify the volume of certain sounds. Currently unused.
ClipsWhen the SFX is played one of the clips will be chosen at random.
VolumeWhen the SFX is played a random volume will be chosen between the min and max values.
PitchWhen the SFX is played a random pitch will be chosen between the min and max values.
Spatial BlendDetermines how “spatial” the audio source is when the SFX is played. 1 = fully 3D
Reverb MixHow “wet” is the reverb effect applied to the audio source.
RolloffWhat type of 3D rolloff will be applied when the spatial blend is 3D.
Rolloff MinMax distance where the clip is played at full volume.
Rolloff MaxMax distance where the clip can be heard.

Create SFX

Create a new Spatial SFX via the menu Assets > Create > Spatial > SFX . This will create a new asset in your project folder. Inside the asset, you can define the clips and parameters that make up your sound effect.

Spatial SFX component

Play SFX

Sound effects can be played via C# Scripting or Visual Scripting.

C# Scripting

Use the SpatialSFX.Play method to play an SFX.

Visual Scripting

Use the Spatial SFX: Play nodes.

Spatial SFX component