SoundTrigger Functions

Reference of all the SoundTrigger functions

Play

// Plays the SoundEvent at the position of the owner Transform
public void Play();
public void Play(SoundTag localSoundTag);
public void Play(params SoundParameterInternals[] soundParameterInternals);
public void Play(SoundTag localSoundTag, params SoundParameterInternals[] soundParameterInternals);
Parameters

localSoundTag

The SoundTag which will determine the Local SoundTag of the SoundEvent

soundParameterInternals

For example SoundParameterVolumeDecibel is used to modify how the SoundEvent is played

PlayAtPosition

// Plays the SoundEvent at the Vector3 position with another Transform as the owner
public void PlayAtPosition(Vector3 position);
public void PlayAtPosition(Vector3 position, SoundTag localSoundTag);
public void PlayAtPosition(Vector3 position, params SoundParameterInternals[] soundParameterInternals);
public void PlayAtPosition(Vector3 position, SoundTag localSoundTag, params SoundParameterInternals[] soundParameterInternals);

// Plays the SoundEvent at the Transform position with another Transform as the owner
public void PlayAtPosition(Transform position);
public void PlayAtPosition(Transform position, SoundTag localSoundTag);
public void PlayAtPosition(Transform position, params SoundParameterInternals[] soundParameterInternals);
public void PlayAtPosition(Transform position, SoundTag localSoundTag, params SoundParameterInternals[] soundParameterInternals);
Parameters

owner

The owner Transform

position

The Transform or Vector3 where is should play at (Transform can follow position)

localSoundTag

The SoundTag which will determine the Local SoundTag of the SoundEvent

soundParameterInternals

For example SoundParameterVolumeDecibel is used to modify how the SoundEvent is played

Stop

circle-info

💡 TIP - Stopping Loops You really only need to use stop for looping or longer oneshot sounds (or the SoundContainer “Stop if Transform is Null” setting). Use the polyphony setting in the SoundEvent to manage the number of instances playing.

Parameters

position

The position Transform

allowFadeOut

If the SoundEvent should be allowed to fade out. Otherwise it is going to be stopped immediately

Pause and Unpause

Parameters

forcePause

If the SoundEvent should be paused even if it is set to "Ignore Local Pause"

Get State

Load or Unload Audio Data

Last updated