Skip to content

format

typescript
AudioSource.loop

class: AudioSource

description

Whether the current audio is played in a loop.

If the audio source plays the audio in a loop, it returns true; otherwise, it returns false.

parameter

param_nametypedescription

reture

typedescription
booleanWhether to loop the audio

code example

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