Unity Pause Game - Easy Tutorial (2023)

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024

Комментарии • 37

  • @digiross7199
    @digiross7199 Год назад +10

    Short, sweet, and to the point. Thank you

  • @kyuib
    @kyuib Год назад +3

    That's so helpful and quick, thank you!

  • @CodeLaniakea-tf5no
    @CodeLaniakea-tf5no 10 месяцев назад +2

    Thank You, Solo Game Dev! I like this tutorial

  • @strmyc
    @strmyc Год назад +3

    Thank u this really helped me out with my game!

  • @Brai-niac
    @Brai-niac Год назад +6

    simple and easy to do. Thanks bro. 1 sub to you.

  •  2 месяца назад

    Thanks man! This is straight to the point! :)

  • @karlosmiguelserrano6744
    @karlosmiguelserrano6744 Год назад +7

    where is the previous video ?

  • @malikmuhammadarslan9993
    @malikmuhammadarslan9993 Год назад +3

    ThankYou buddy

  • @stuffedmannequin
    @stuffedmannequin 11 месяцев назад +3

    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.

    • @EmeraldForestCat
      @EmeraldForestCat 10 месяцев назад +1

      Use Time.unscaledTime for things that need to work during a pause.

    • @itsdonix
      @itsdonix 10 месяцев назад

      @@EmeraldForestCat can u be more specific?

    • @EmeraldForestCat
      @EmeraldForestCat 10 месяцев назад

      @@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.

    • @itsdonix
      @itsdonix 10 месяцев назад

      @@EmeraldForestCat Thank you for the support. I figured it out myself after awhile but, thanks anyways!

  • @rosettegolda232
    @rosettegolda232 Год назад +2

    ha no way i just made a pause screen and this came up in my recommended!

  • @malikmuhammadarslan9993
    @malikmuhammadarslan9993 Год назад +1

    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.

  • @vineetmalekar3225
    @vineetmalekar3225 8 месяцев назад

    Thank you

  • @yhkim1606
    @yhkim1606 Год назад +1

    very nice.

  • @nieboszczyq
    @nieboszczyq Год назад +2

    How can I make it so that I have to press esc instead of some button on the screen?

    • @chemax79
      @chemax79 Год назад +3

      Make an if Statement with "if (Input.GetKeyDown(KeyCode.Escape){}"
      And put your desired code(Calling the pause menu) in curly brackets

    • @nieboszczyq
      @nieboszczyq Год назад +1

      @@chemax79 thanks

  • @ahmet19830
    @ahmet19830 Месяц назад

    Can I copy the code? Where can ı take it easily?

  • @briannamorales2345
    @briannamorales2345 4 месяца назад

    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

  • @byram_brt
    @byram_brt 9 месяцев назад

    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

    • @SoloGameDev
      @SoloGameDev  9 месяцев назад

      You can do it before the game stop if u ask this

    • @byram_brt
      @byram_brt 9 месяцев назад

      @@SoloGameDev ty for answer, my problem was different but it was solved :)

  • @quentinlasne1381
    @quentinlasne1381 4 месяца назад

    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

    • @SoloGameDev
      @SoloGameDev  4 месяца назад

      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.

    • @quentinlasne1381
      @quentinlasne1381 4 месяца назад

      @@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

  • @dasquadraiders2498
    @dasquadraiders2498 9 месяцев назад

    how can i make the quit button work???

    • @SoloGameDev
      @SoloGameDev  8 месяцев назад

      You can use Application.Quit() command for this.

    • @z.6377
      @z.6377 5 месяцев назад

      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

  • @CautionYT754
    @CautionYT754 3 месяца назад

    can someone put the entire C# Script in the comments please?

    • @kanarakun8449
      @kanarakun8449 23 дня назад

      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
    @Johan-rm6ec Месяц назад

    Not helpfull, in a decent project only time = 0 is not enough.