AmbientAudioComponent
A Component used to create ambient audio effects in the scene, such as ambient sound effects, ambient music, and more.
This component takes the audio source's relative orientation into account, creating a more immersive and realistic audio experience.
Notes:
Do not add ObjectAudioComponent, AmbientAudioComponent, and ChannelAudioComponent to the same entity simultaneously.
Always add ObjectAudioComponent, AmbientAudioComponent, or ChannelAudioComponent to the entity before calling Entity.prepareAudio or Entity.playAudio.
Constructors
Link copied to clipboard
constructor()
Creates a new AmbientAudioComponent with default settings.
constructor(@FloatRange(from = 0.0, to = 1.0) volume: Float = 1.0f)
Creates an AmbientAudioComponent instance with the specified volume.