Skip to content

format

typescript
AudioSource.isVirtual

class: AudioSource

description

Whether the current audio is virtual.

Virtual sound typically refers to sound effects that are simulated or generated by the audio engine at runtime, rather than being pre-recorded real sound files. If the audio source is virtual, it returns true; otherwise, it returns false.

parameter

param_nametypedescription

reture

typedescription
booleanWhether the current audio is virtual.

code example

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