format
typescript
AudioSource.spatialBlendclass: AudioSource
description
Spatial blend of the audio source.
The value ranges from 0.0 to 1.0. When the value is 0.0, the audio source will not participate in 3D spatial blending and its sound will be treated as 2D audio, so it will sound the same regardless of the player's position. When the value is 1.0, the audio source will fully participate in 3D spatial blending and its sound will change based on the player's position and direction in 3D space.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
number | The spatial blend of the audio source. |
code example
typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.spatialBlend;