AmbientAudioComponent

@MainThread
class AmbientAudioComponent : Component

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:

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.

Properties

Link copied to clipboard
var volume: Float

The volume value of audio, range [0.0, 1.0], Default value is 1.0f.

Functions

Link copied to clipboard
open override fun clone(): Component

Creates and returns a copy of this Component instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String