ProximityAudioSource
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
canPlay
fadeIn
fadeSpeed
setVolume
source
canPlay
Can this audio source play sound?
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | false |
fadeIn
Not modifiable in the inspector. If you want to start fading in or out the sound. True = Fade in, False = Fade out
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | false |
fadeSpeed
How fast to fade in/out music. Higher values = Faster
| Exposed Value | Type | Default Value |
|---|---|---|
| public | float | 0.25f |
setVolume
Not modifiable in the inspector. This is modified by other scripts setting its starting volume.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | float | 0 |
source
The source where the sound will be played from.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | AudioSource | None |
Function Definitions
Select the function name from below to jump directly to it on this page.
private void Start()
Automatically sets the AudioSource to loop its sound.
| Expose Value | Overrideable | Returns |
|---|---|---|
| private | False | Does not return anything |
No parameters
private void Update()
Will fade in the sound if the setVolume is greater than zero and it is allowed to play. Will also fade out the sound if the setVolume is lower than the current volume and is allowed to player. Otherwise if it’s zero it will stop the sound.
| Expose Value | Overrideable | Returns |
|---|---|---|
| private | False | Does not return anything |
No parameters