Unity Community

Results 1 to 2 of 2

  1. Location
    El Salvador

    music background loop .... how ?

    Hi ...
    just to ask someone please ......
    What is the best way to use a music background, and
    not consume to much resources.

    in other words .....
    how make a loop background sound ( on all level game ) , using few unity resources,
    to not affect performance and fluidity of the game.

    thanks a loot
    Unity3d + cinema4D + Photoshop + TeachText

  2. Location
    The fasted method would be an uncompressed audio file, but regarding music that's not really an alternative because memory usage is way too high. I would not even load a compressed audio into memory, but stream it from disc. Depends on length and target platform.

    You should be able to use a single, compressed audio stream (mp3 on iOS/android/osx, ogg on pc) without a noticeable performance loss. On iOS you can use hardware decoding for one audio stream.

    What is your target platform? On PC everything should usually be using OGG compression without noticing a real performance drop.

    If you want the music to play continuously without restarting on level load, you should have a look at http://unity3d.com/support/documenta...royOnLoad.html. AudioListener and AudioSource should be flagged this way.
    Recent Unity Projects:

    Crystal Storm (iOS & Android)
    Gene Effect (iOS & Android)

    Website: Lightstorm3D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts