Search Unity

Multiple AudioSources or change audio Clip?

Discussion in 'Audio & Video' started by Zocker1996, Mar 28, 2016.

  1. Zocker1996


    Jan 12, 2015
    I'm developing a mobile game.
    I got a barrel rolling on the ground and as long as it's rolling it plays its rolling sound.
    But as soon as it drops I need it to play the dropping sound for a while and then start playing the rolling sound again.

    I'm going to have several barrels and since I havent worked with sound before I need to know:

    Is it better (for performance) to use one AudioSource and change the clip or use a seperate AudioSource for each clip?
  2. jerotas


    Sep 4, 2011
    Well it's strange to put more than one Audio Source on a single game object. Personally we put all Audio Sources on a central game object.

    I believe that with Unity 5, the number of Audio Source not playing anything doesn't have any real impact on audio memory or performance.