C
C#•2y 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•2y ago
$details
MODiX
MODiX•2y 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•2y 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•2y 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•2y ago
whats wrong with setting Time.timeScale to 0?
Cattywampus
Cattywampus•2y 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•2y ago
usually in my games that arent made in unity i just dont call the update method
Cattywampus
Cattywampus•2y ago
problem with these youtube videos that keep telling people to use timeScale for pausing the game 😅
anita
anita•2y ago
i think if you pause your game you also wan't your pyhsics to be paused....
SteliosKrom
SteliosKromOP•2y 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•2y ago
u can close it too, since ur the poster
Want results from more Discord servers?
Add your server