Is there a way to pause the game while not pausing certain things? For example, I have a function where a character can examine something, and I would like time to stop around them so they don't get attacked while examining. However, using Time.timeScale pauses the text crawl for whatever it is they're trying to examine. Also trying to use Time.timeScale affects the inventory UI as well.
@EmeraldForestCat10 ай бұрын
Use Time.unscaledTime for things that need to work during a pause.
@itsdonix10 ай бұрын
@@EmeraldForestCat can u be more specific?
@EmeraldForestCat10 ай бұрын
@@itsdonix Changing the global game time does not affect Time.unscaledTime. You can safely slow down, speed up or pause everything without worrying that this will affect methods that use Time.unscaledTime.
@itsdonix10 ай бұрын
@@EmeraldForestCat Thank you for the support. I figured it out myself after awhile but, thanks anyways!
@rosettegolda232 Жыл бұрын
ha no way i just made a pause screen and this came up in my recommended!
@SoloGameDev Жыл бұрын
😄
@vineetmalekar32258 ай бұрын
Thank you
@malikmuhammadarslan9993 Жыл бұрын
Can you please make a video on how can we save progress in seen for example in a city builder 2d game how can we same the whole city building and data.
@yhkim1606 Жыл бұрын
very nice.
@SoloGameDev Жыл бұрын
Thanks :)
@briannamorales23454 ай бұрын
hi, when I click the pause button the menu does not show up but instead says "NotImplementedException: The method or operation is not implemented." Would you know how to fix this? I'm new to coding so I am unsure what to do. Thanks
@ahmet19830Ай бұрын
Can I copy the code? Where can ı take it easily?
@nieboszczyq Жыл бұрын
How can I make it so that I have to press esc instead of some button on the screen?
@chemax79 Жыл бұрын
Make an if Statement with "if (Input.GetKeyDown(KeyCode.Escape){}" And put your desired code(Calling the pause menu) in curly brackets
@nieboszczyq Жыл бұрын
@@chemax79 thanks
@byram_brt10 ай бұрын
i stopped game with time.timescale=0; but i cant work this code "Button.interactable=true;" i searched and i probably i need to solve this with time.unscaledTime but how can i do it? help me plz
@SoloGameDev10 ай бұрын
You can do it before the game stop if u ask this
@byram_brt10 ай бұрын
@@SoloGameDev ty for answer, my problem was different but it was solved :)
@quentinlasne13814 ай бұрын
I changed the pause button to the keyBind esc and when I click on resume, it work but I need to click twice in escape to make pause again, can someone help me please ? I think It's a bit too late but I hope too
@SoloGameDev4 ай бұрын
There may be a problem with your controls. You can check whether the menu is active or not when you press the Esc key. If the menu is not active, you should put a control like open and close if it is active.
@quentinlasne13814 ай бұрын
@@SoloGameDev there is no problem when I click on esc, If I click again, the pause menu appear directly. But when I click on resume I have to click twice
@dasquadraiders24989 ай бұрын
how can i make the quit button work???
@SoloGameDev9 ай бұрын
You can use Application.Quit() command for this.
@z.63776 ай бұрын
after i click exit and return to the main menu scene where i can click play, and i when click play, my game starts at time 0 and cant start the game@@SoloGameDev
@CautionYT7544 ай бұрын
can someone put the entire C# Script in the comments please?
@kanarakun844929 күн бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PauseMenu : MonoBehaviour { public GameObject PausePanel; // Update is called once per frame void Update() { } public void Pause() { PausePanel.SetActive(true); Time.timeScale = 0; } public void Continue() { PausePanel.SetActive(false); Time.timeScale = 1; } }
@Johan-rm6ecАй бұрын
Not helpfull, in a decent project only time = 0 is not enough.