A question about audio mixers

Hi guys

Does each object, in this case spaceships, need their own groups for each sound?

What I mean is:

If i have two spaceships A and B

They both have these sounds

WhenHit
Explode
FireLaser
FireMissile

WhenHit and Explode are the same sound
FireLaser & FireMissile are unique to the object.

Can you have both objects share the same mixer and the same group?
Will this cause a problem if both ships are hit at once?
so can both share the WhenHit and Explode

eg if my mixer has:

Enemy
WhenHit
Explode
FireLaser
FireMissile

or should they have

Enemy
Ship1Explode
Ship2Explode
Ship1WhenHit
Ship2WhenHit

Yes i could tediously test this, but just wondered if someone out there knew the answer.

I mean, it depends on what you are trying to achieve. You don’t want to have one group by AudioSource, as you can change the AudioSource directly. You could have one group for enemy, explode, and so on, but if there are all set the same way, you should bundle them together. Generally, most games have one group for music and one group for sound effects so that the player controls the volume. After that, it depends on what you need but generally less is better.

ok so one sound allocation on a mixer say “Explode” will replicate sounds if say 5 objects explode at the same time?

If you call AudioSource.Play on five different AudioSource in the same mixer group, you will hear five explosions.

1 Like

Thanks