Audio

Audio Component

The Audio Component is a core component in Galacean used to add audio playback functionality to entities. Through the audio component, developers can control the playback, pausing, stopping, and volume adjustment of audio files.

Adding the Audio Component

Developers can follow these steps to add the audio component to an entity:

  1. Select the Target Entity: Choose the Entity where you want to add the audio component.
  2. Access the Inspector Panel: Navigate to the Inspector panel for the selected entity.
  3. Add the Component: At the bottom of the Inspector panel, click on "Add Component" and select "AudioSource".

Adjusting Volume and Mute

The audio component provides features to adjust the volume and mute the audio. Developers can control these properties either through scripts or directly in the Inspector panel.

Controlling Playback Timing

The audio component allows developers to precisely control the timing of audio playback. By using scripts, developers can invoke methods to play, pause, and stop audio files as needed.

Was this page helpful?