Skip to content

format

typescript
AudioSource.priority

class: AudioSource

description

The priority of audio playback.

Priority is used to control the order of audio sources when multiple sources are playing simultaneously. Audio sources with higher priority will override those with lower priority.

parameter

param_nametypedescription

reture

typedescription
numberThe priority of audio playback.

code example

typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.priority;