format
typescript
AudioSource.isVirtualclass: 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_name | type | description |
|---|
reture
| type | description |
|---|---|
boolean | Whether the current audio is virtual. |
code example
typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.isVirtual;