Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

need help restarting game

A topic by FloppyGameDev created Jul 30, 2023 Views: 188 Replies: 10
Viewing posts 1 to 10
Submitted

when I return to main menu, it keeps the game scene going even when I have returned. so when I hit play it keeps the progress from before I hit return. how do I fix this?

Submitted (1 edit)

What game is this? Send me a link and I can take a look!

Submitted

its paradiver, but I don't have the bug on the playable because this is a new problem from my recent edits to the game.

Submitted

I'm assuming the menu is a seperate scene?
My usual command is SceneManager.LoadScene(0); (or whichever number scene you wish to load)

Another thing if things are being changed by a script, are the values assigned at the start or just updated as the script runs?

I honestly don't know how much difference the second one makes as I've never had the issue before, and haven't been at this very long (As in, i've tinkered through the years but never made any actual games until just over a week ago)

Submitted

I think I'm going to just leave the game be. I don't want to ruin it.

Submitted

Do you have to fix this? you could manually reset it as a quick fix. Since these are just for the challenge.

Submitted

What I meant was, you can manually position the player at start, and clear the scene, and reset all of the score points. 

Submitted

If it makes you feel happier about changing stuff, you could duplicate your project folder so that you have a working backup to revert to? I don't know if you do that already but I only figured it out a couple days ago :)

Submitted

Also if you haven't already, try looking up "How to add a menu to my endless runner unity", or something similar that fits your issue, because although your game isn't what you generally think of when someone says endless runner, I reckon a lot of the concepts (and their code if you really need!) could very easily be applied to it

Submitted

thank you! Even if not used in this jam, I will take that into account on future updates as I want this to be a game even after the jam is over.

Submitted

OK! No worries :)