Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Audio RTS too many sounds

Discussion in 'Audio & Video' started by VictorKs, Dec 1, 2019.

  1. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    I'm in the late stages of developing an RTS similar to total war. I have thousands of soldiers moving in 40 groups. I have an army_walk loop playing for each group the problem when many groups move there are too many sounds. How can I fix this?
     
  2. sdochertymusic

    sdochertymusic

    Joined:
    Aug 13, 2019
    Posts:
    8
    You need to code up something to stop this loop getting triggered for every animation ... like a manager to manage the playing of this sound... Could even be that this loop should only play 1 instance and you just need something life if(!sound.isplaying) { sound.Play(); }
     
    VictorKs likes this.
  3. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    I tried that and things improved, but I finally went with Wwise anyway thanks for helping out!