class BaseSoundComponent : Component

book_4_sparkGenerated
code_blocksInput

Description

The BaseSoundComponent class in the Sandbox namespace is an abstract class that provides a foundation for sound components in a scene. It inherits from the Component class and is designed to manage audio playback, including properties for sound events, volume, pitch, and various sound effects like occlusion and reflection.

Members

Instance Properties

Member NameSummary
TargetMixerThe mixer we want this sound to play through.
SoundEventThe sound event associated with this component.
PlayOnStartIndicates if the sound should play when the component starts.
StopOnNewDetermines if the current sound should stop when a new sound is played.
SoundOverrideEnables overriding of sound properties.
VolumeControls the volume of the sound, ranging from 0 to 1.
PitchAdjusts the pitch of the sound, ranging from 0 to 2.
Force2dForces the sound to be played in 2D.
RepeatEnables the sound to repeat.
MinRepeatTimeMinimum time between sound repeats.
MaxRepeatTimeMaximum time between sound repeats.
DistanceAttenuationOverrideEnables overriding of distance attenuation settings.
DistanceAttenuationDetermines if distance attenuation is applied.
DistanceSets the distance for sound attenuation.
FalloffDefines the falloff curve for distance attenuation.
OcclusionOverrideEnables overriding of occlusion settings.
OcclusionDetermines if occlusion effects are applied.
OcclusionRadiusSets the radius for occlusion effects.
ReflectionOverrideEnables overriding of reflection settings.
ReflectionsDetermines if reflection effects are applied.

Instance Methods

Member NameSummary
StartSoundBegins playback of the sound.
StopSoundStops playback of the sound.