Environmental Audio
This component belongs to the following package:
- com.yahaha.sdk.audio
 
Description
The EnvironmentalAudioComponent is attached to a GameObject to simulate complex environmental sounds.
Properties
| Properties | Description | 
|---|---|
| Enable | If enabled, the environmental audio, including background music and constant and random ambient sounds, will start playing when the scene launches. Disabled by default. | 
| BGM | Sets the audio clip to be played as the background music in the environment. | 
| BGM Volume | Sets the volume level of the background music. Ranges from 0 (silent) to 1 (normal). Default value: 1. The BGM volume is multiplied with total volume of global audio. | 
| AMB | Sets the audio clip that will be played as the ambient sounds in the environment. | 
| AMB Volume | Adds one or more audio clips that will be randomly chosen and played as ambient sounds in the environment. The AMB volume is multiplied by both total volume in global audio and BGM volume. | 
| Random AMB | Adds one or more audio clips that will be randomly chosen and played as ambient sounds in the environment. AMB List Name: Enter a custom name for the list of ambient sound effects that will be randomly chosen to play. Random Playback Interval: Specify a range of time values (in seconds) for ambient sound playback. When playing ambient sounds from the list, a random number within the set range will be generated and used as the playback interval. Random Playback Volume: Specify a range of volume values for ambient sound playback. When playing ambient sounds from the list, a random number within the set range will be generated and used as the playback volume level. Values should be between 0 and 1. The value will be multiplied by total volume of global audio the BGM volume, and AMB volume. Sounds: Adds one or more audio clips that will be randomly chosen and played as ambient sounds. One clip from this list is selected each time a random ambient sound is played.  | 
Trigger
Action:
- Play
- Description:
- Plays the environmental audio effect.
 
 - Arguments:
- self: com.yahaha.sdk.audio.components.EnvironmentalAudioComponent The component object
 
 
 - Description:
 - Stop
- Description:
- Stops the environmental audio effect.
 
 - Arguments:
- self: com.yahaha.sdk.audio.components.EnvironmentalAudioComponent The component object
 
 
 - Description: