Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

BUG FIX!

A topic by FloppyGameDev created Jul 29, 2023 Views: 139 Replies: 5
Viewing posts 1 to 4
Submitted

I'm editing paradiver to have a main menu scene and there is this bug where you hit play, and it works, but then you pause and return to menu and hit play again and it keeps the game paused. any ideas?

Submitted

can you give me the link of the game?

Submitted (1 edit)

When you pause a game if you use Unity you set the TIme.deltaTime =0f; just add in the menu script on void Start {Time.deltaTime =1f;} this works only in unity

Submitted

can you give me an example where you restart the game entirely instead of just unpausing time because I don't want the player to return and then play and continue their progress.

Submitted

Just seen this...

Okay so you want to have "using UnityEngine.SceneManagement;" at the top of your script.

To restart the active scene: SceneManager.LoadScene(SceneManager.GetActiveScene().name);

To load a different scene in: SceneManager.LoadScene(scenenumber); where you find the order of the scenes in the build settings. You may need to add active scene to the build list, but that's just one button click at the bottom right of the box where you're ordering the scenes

Submitted

ok thank you