- Home /
Question by
FourtifiedGaming · May 11, 2016 at 10:04 AM ·
scene-switchingscenesswitchingpause game
Problem when switching between scenes
Ok so I have 2 scenes in this game, the main menu and the actual level. When i start at the main menu and go into the level, no problems. I can then pause/resume and pause and return to the main menu. Once at the main menu for the second time, I can re-enter the level but it starts off as if i am still paused and will only work if I bring up the pause menu and block the screen. Any suggestions?
Comment
@FourtifiedGa$$anonymous$$g Without exa$$anonymous$$ing your code i can guess. i think Time.timeScale is zero on 2nd time renter. Just write Time.timeScale = 1 ; in Awake. Hope for the best. If it does not work then post your code.
as @saud_ahmed020 suggested. You should make Time.timescale =1f; in the Start method like so:
void Start()
{
Time.timeScale = 1f;
}