Version: 2023.2
Audio Random Container reference
Create a randomized playlist with the Audio Random Container

Audio Random Container fundamentals

This page describes the audio concepts and terminology that you should understand before you use the Audio Random Container to create a randomized audio playlist.

The concepts you must know are the audio cycle and the AudioSource API exceptions.

Audio cycle

An audio cycle is the full audio clip list length. If the list has three audio clips, an audio cycle is three clips.

AudioSource API

Use the AudioSource APIs to start, pause, and stop an Audio Random Container. This is similar to when you use the AudioSource APIs to play, pause, and stop an Audio Clip, but with the following exceptions:

  • isPlaying returns true when the Audio Random Container plays an audio clip through an audio source.
  • AudioSource.Play behaves differently depending on whether you set the Audio Random Container to Manual or Automatic. When set to Manual, the AudioSource.Play triggers a new instance in the Audio Clip list based on the Playback mode.

其他资源

Audio Clip, the audio cycle, the AudioSource priority, and the AudioSource API exceptions.

Audio Random Container reference
Create a randomized playlist with the Audio Random Container
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961