PlaySFX
Method
PlaySFX has 3 overloads.
PlaySFX(SpatialSFX, float, float)
Plays the given SFX with a cached AudioSource.
Parameters
Parameter | Description |
---|---|
SpatialSFX sfx | SFX clip to play |
float extraVolume | Extra volume to add to the clip |
float extraPitch | Extra pitch to add to the clip |
PlaySFX(SpatialSFX, Vector3, float, float)
Plays the given SFX with a cached AudioSource at a given position.
Parameters
Parameter | Description |
---|---|
SpatialSFX sfx | SFX clip to play |
Vector3 position | Position to play the clip at |
float extraVolume | Extra volume to add to the clip |
float extraPitch | Extra pitch to add to the clip |
PlaySFX(SpatialSFX, AudioSource, float, float)
Plays the given SFX on the provided AudioSource.
Parameters
Parameter | Description |
---|---|
SpatialSFX sfx | SFX clip to play |
AudioSource source | AudioSource to play the clip on |
float extraVolume | Extra volume to add to the clip |
float extraPitch | Extra pitch to add to the clip |