C
C#•16mo ago
SteliosKrom

How to resume my game in pause menu when I click the resume button?

So, I want to resume my game whenever I click on resume button, so that the game starts back again and the main audio of the game is playing back again.
11 Replies
TheRanger
TheRanger•16mo ago
$details
MODiX
MODiX•16mo ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Kensei
Kensei•16mo ago
are you using Unity? time.timeScale = 0 (or something around those lines) should do the trick for pausing, then setting it back to 1 when resuming the game
Cattywampus
Cattywampus•16mo ago
even if he's using Unity, DON'T pause your game with Time.timeScale = 0 there are ways more proper to do this
TheRanger
TheRanger•16mo ago
whats wrong with setting Time.timeScale to 0?
Cattywampus
Cattywampus•16mo ago
Unity's physices engine and bunch of other things tied to timeScale and you'd end up with bunch of guard-clausing just to free them up from their lock states due to timeScale was set to 0
TheRanger
TheRanger•16mo ago
usually in my games that arent made in unity i just dont call the update method
Cattywampus
Cattywampus•16mo ago
problem with these youtube videos that keep telling people to use timeScale for pausing the game 😅
anita
anita•16mo ago
i think if you pause your game you also wan't your pyhsics to be paused....
SteliosKrom
SteliosKrom•16mo ago
Hey, guys! Thanks for joining but I found a way and i have solved it thanks anyway 🙂 You can close this thread
TheRanger
TheRanger•16mo ago
u can close it too, since ur the poster
Want results from more Discord servers?
Add your server