How To Say that By code (C#) ?

i have 4 characters they are talking while there is a music background
what i want to say is

If (any audio play) {
pause the music background audio
}
Else
{
unpause the music background
}
how to say that ?
thanks in Advance

1 Like

Did you understand my question ?
i want to say that if any audio is working
without Attach it to script

Then you’d want this to find all the audio sources: Unity - Scripting API: Object.FindObjectsOfType