SoundComponent

Component handling audio playback.

Summary
SoundComponentComponent handling audio playback.
Functions
NKPlay3DSoundPlay a 3D sound by name originating at this object with an optional offset.
NKStop3DSoundStop a 3D sound by name originating at this object.
NKPlayLocalSoundPlay a sound by name without 3D attenuation.
NKIsPlayingReturns true if a sound by that name is currently being played.

Functions

NKPlay3DSound

Play a 3D sound by name originating at this object with an optional offset.

Parameters

stringThe name of the sound to play.
boolIf true, this sound will loop until explicitly stopped.
vec3The offset from the attached GameObject that this sound should originate.
floatThe minimum distance before the fall-off will be applied.
floatThe maximum distance before the audio has fully fallen-off.

NKStop3DSound

Stop a 3D sound by name originating at this object.

Parameters

stringThe name of the sound to stop.

NKPlayLocalSound

Play a sound by name without 3D attenuation.

Parameters

stringThe name of the sound to play.
boolIf true, this sound will loop until explicitly stopped.

NKIsPlaying

Returns true if a sound by that name is currently being played.

Parameters

stringThe name of the sound to check.

Returns

boolTrue if a sound matching the provided name is currently playing.
Close