Forum rules - please read before posting.

Play background music while the game is paused

edited July 2014 in Technical Q&A
So, I noticed when the game is paused the timescale is set to 0 and I already know that chris said to me is a unity issue. Today I posted on the unity forum and a member of unity technologies answered to me like this.

Sounds right to me. If time isn't advancing everything is frozen,
right? If you want music to continue to play whilst the graphics are
frozen, maybe leave time advancing, but stop animating the objects.


So any idea how can I play a background sound while the game is paused? I really don't know...or maybe chris ur script is working but I don't have a clue on how it is supposed to work...

Comments

  • To do this simply create the the "SOUND" object via the Game Editor window.

    Once created, apply your music to the AudioSource and on the Sound script tick 'Play while game paused".

    If this doesnt work, try a reimport or check your audio.
  • edited July 2014
    as I said...the play while game is paused function is corrupted...and after the reply from the unity technologies member I don't know if the beahviour is correct...
  • The Unity forum guy basically said that you should not pause your game. When you want your game to be "paused", create an action list asset or a custom script where you stop whatever moving/changing components you have.
  • I tought the checkbox was studied actually for that...am I wrong chris?
  • Sorry, what checkbox?
  • Play while game is paused
  • Fixed, at long last.  Seems I was wrong - it wasn't a bug, was just down to a lack of documentation when Unity added the feature.  Never mind, look out for it in 1.38.
  • Are you sure that in 1.38 this is fixed? Because I have some music with the "play while game paused" checked but when I pause game the music stop... maybe I made something wrong...
  • Happened to me too.
  • Same here, checked Play While Game Is Paused but no dice.
  • Don't know why it stopped working (has for me, too), but fixed for 1.39.  Properly this time!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.