PAUSE MENU in Unity

Sdílet
Vložit
  • čas přidán 19. 12. 2017
  • Learn how to make a pause menu using Unity!
    As mentioned in the video, we've already created a start menu and a settings menu. Check them out:
    Start menu: goo.gl/EM7rr6
    Settings menu: goo.gl/KBgy8p
    TextMesh Pro Video: goo.gl/YdQ3MA
    Get TextMesh Pro: goo.gl/Z9iHxH
    ❤️ Donate: www.paypal.com/donate/?hosted...
    ····················································································
    ► Join Discord: / discord
    ♥ Subscribe: bit.ly/1kMekJV
    ● Website: brackeys.com/
    ● Facebook: / brackeys
    ● Twitter: / brackeystweet
    ········································­­·······································­·­····
    Edited by Sofibab & LeBonques.
    ········································­­·······································­·­····
    ► All content by Brackeys is 100% free. We believe that education should be available for everyone.
    ❤️ Donate: www.paypal.com/donate/?hosted...
    ········································­­·······································­·­····
    ♪ Baby Plays Electro Games
    teknoaxe.com/cgi-bin/link_code...

Komentáře • 1,9K

  • @bumpleGrumpGames
    @bumpleGrumpGames Před rokem +72

    It's mind blowing how Brackeys videos stay relevant and work so well 6 YEARS LATER. Making games is a daunting task but this content has made the learning curve so much smoother! Thank you for sharing so much knowledge with the indie game dev community. 🙏🙏🙏

  • @Ice_ZOMBIES
    @Ice_ZOMBIES Před 2 lety +56

    That sad feeling when you discover Brackey and his videos after he has already left CZcams... I feel like I just missed a legend passing by. God damn

  • @siva6137
    @siva6137 Před 6 lety +1787

    Who dislikes these videos? They're bloody free lessons.

    • @dfhdgsdcrthfjghktygerte
      @dfhdgsdcrthfjghktygerte Před 6 lety +29

      Sure. I like the all free lessons on youtube, especially with crappy content and retarded speaker, even if lesson is a trash - i like it, because i'm freebie!

    • @siva6137
      @siva6137 Před 6 lety +92

      Ouuuu, I can sense sarcasm here. No hate whatsoever, but, it takes a lot of effort to create/develop something. We just need to keep that in mind before commenting. Support or Ignore.

    • @rodentlover100
      @rodentlover100 Před 6 lety +49

      Russian man
      take me by the hand
      lead me to the land
      with words I don't understand

    • @rodentlover100
      @rodentlover100 Před 6 lety +33

      Russian man you're honestly stupid if you think these are bad lessons. Maybe learn how to code so you actually know what you're doing instead of copying his code letter for letter word for word and crying when you mess it up.

    • @Definitely_a_Fox
      @Definitely_a_Fox Před 6 lety +24

      My brain hurts when spelling errors cause errors in code, but the real error is believing that the teacher screwed up and gave you a bad lesson.

  • @Anthrocarbon
    @Anthrocarbon Před rokem +40

    Once again, years on, these tutorials remain a staple of my learning. Brackeys, I hope you're all having a great future whatever you're doing.

    • @cryzzzz
      @cryzzzz Před rokem

      Mine is just not working I dont get the game object?

  • @achintyacancode3543
    @achintyacancode3543 Před 3 lety +132

    If your game gets stuck when you reload it from the menu, Do this - When you go to load the menu, in the LoadMenu function, Make sure to include the Resume function, or your game will load in a paused state. As a matter of fact, wherever you are getting this problem, just call the resume function before transitioning to the next level. Hope I helped you!

    • @connorlewis984
      @connorlewis984 Před 3 lety +7

      You're a LEGEND Wumpus! Thoss Discord devs taught you well!

    • @nowlog502
      @nowlog502 Před 2 lety +5

      save scene with your menu panel as inactive and it will work as in the video

    • @ItssVenom
      @ItssVenom Před 2 lety +1

      Thank you I was looking for a comment giving an explanation to this issue haha

    • @s1moq108
      @s1moq108 Před 2 lety +3

      can someone explane me better i coudnt find that button

    • @sausagequeen
      @sausagequeen Před 2 lety

      @@ItssVenom it says it in the video 😐

  • @jakethewoz
    @jakethewoz Před 5 lety +11

    These are by far the best tutorials anywhere. Tried to make a pause menu on my own, got stuck, came here and everything is just simple and crystal clear. Thank you so much!

  • @youbinwang1205
    @youbinwang1205 Před 2 lety +10

    Here are some tips while using unity 2021+
    1. Can't press the button?
    Please make sure you also add the "EventSystem" Object in your new scene. (just copy it from your old scene)
    2. SetActive(false) makes object never called again?
    Try to use: pauseMenuUI.transform.localScale = new Vector3(0, 0, 0); instead,
    then SetActive(true) is: pauseMenuUI.transform.localScale = new Vector3(1, 1, 1);
    In the start then add: pauseMenuUI.transform.localScale = new Vector3(0, 0, 0);
    Remember to active PauseMenu before you start the game.
    3. mouse locked?
    Add in Ruseum:
    Cursor.lockState = CursorLockMode.Locked;
    Add in Pause:
    Cursor.lockState = CursorLockMode.None;
    Hopefully it can help you :)

    • @HallieTheHero
      @HallieTheHero Před 3 měsíci +2

      Oh my gosh thank you! I am working on a project for college and I couldn't figure out for the life of me why the buttons couldn't be clicked and were not changing shade when hovered over or clicked. Really appreciate it that fixed my problem!

    • @dunderguy
      @dunderguy Před měsícem

      ty bro

    • @dragonanimations0748
      @dragonanimations0748 Před 2 dny

      When you say to add "pauseMenuUI.transform.localScale = new Vector3(0, 0, 0); " in the start where exactly does that mean? Is that to be applied before the void update function? Also thank you so much for this,, it's extremely helpful^^

  • @retsapb6319
    @retsapb6319 Před 4 lety +15

    These lessons are so clear, well edited and to the point is unbelievable. Sometimes i find myself binge watching tutorials that i dont need just because they are so entertaining

    • @FriesPG
      @FriesPG Před rokem

      How do I fix error cs0106?

  • @MohanABK
    @MohanABK Před 6 lety +8

    Man, you deserve way more subscribers.
    This is legit hard-earned, good quality, perfect explanation pace, learning content.

  • @christianthompson1839
    @christianthompson1839 Před 5 lety +66

    Why was this the hardest part in making my game xD
    Also thanks for the freaking free lessons, tbh I've learned more from YOU than the lessons my parents paid for, that's freaking cool, like you! I might donate when I have money to get you a cup of coffee, thanks!

    • @CC_-pn2og
      @CC_-pn2og Před 2 lety +2

      i know menus are so hard!

  • @wushu7294
    @wushu7294 Před 4 lety

    The best thing about his videos are , they are to the point. He does not waste any time and has all of his videos edited perfectly. Great Job.

  • @OilRacki
    @OilRacki Před 6 lety +1

    This is a good tutorial. It's a fairly basic concept, but you expand on it nicely, and your pacing is perfect. I like how you fly through it in the beginning. Sometimes tutorials go a little too slow. We have ability to pause and rewind video, folks! Saved this one to my bookmarks for later when I decide to add pause menu to my game.

  • @koseki_stuff
    @koseki_stuff Před 3 lety +79

    I am watching this at 1:00 AM, slowly losing my sanity, but thanks tho
    REST IN PEPPORONIS
    BRACKEYS
    2012 - 2020

  • @alekosthecrow
    @alekosthecrow Před 4 lety +244

    2:10 Imagine having to add a shadow component to your text
    ~This post was made by the TMP gang

    • @joevent
      @joevent Před 4 lety

      Im using Unity 5.6.7f, why don't I have text mesh pro?

    • @alekosthecrow
      @alekosthecrow Před 4 lety +3

      @@joevent you need to import it

    • @pitbull2498
      @pitbull2498 Před 3 lety +5

      @@Plazmin hey stop it text mesh better
      ~This post was made by the TMP gang

    • @lightninbolt986
      @lightninbolt986 Před 3 lety +8

      @@joevent ​ Imagine having to import it.
      ~this post is by latest unity with inbuilt TMP gang

    • @bonzodimduly
      @bonzodimduly Před 2 lety

      i use custom fonts and cant use TMP with them

  • @thepithief3700
    @thepithief3700 Před 6 lety +1

    Brackeys, you have incredible timing! A couple of days ago i was working on a pause menu in a project i am working on. Then a couple days later i see this :) Great video, it was very informative!

  • @reavercleft
    @reavercleft Před rokem +2

    2023 and Brackeys is still saving my arse.

  • @explior6558
    @explior6558 Před 4 lety +4

    Thank you so much Brackeys, that helped a lot as usual!

  • @casachezdoom2588
    @casachezdoom2588 Před 3 lety +29

    One slight issue you might encounter as I did, is that if you go from your pause menu to the main menu and then launch your game, if you press escape it will do nothing the first time because the game is still considered "GameIsPaused = true" so add "GameIsPaused = false;" to the beginning of LoadMenu()

    • @torn2668
      @torn2668 Před 2 lety +2

      I know you commented this a year ago but thanks so much for the helpful tip.

    • @casachezdoom2588
      @casachezdoom2588 Před 2 lety +1

      @@torn2668 Glad it was helpful "in the future" :)

    • @atiqbhai8360
      @atiqbhai8360 Před rokem +1

      🏮

    • @junglejim6674
      @junglejim6674 Před rokem +3

      you could also consider creating an awake method where you set both the time scale back to 1, and the isPaused boolean back to false, so when you're loading a new scene it will automatically adjust it, so you don't have to change the functionality of your methods.

    • @Mucky_Muck
      @Mucky_Muck Před rokem +1

      @@junglejim6674 Thanks. What the guy above said didn't work, but your solution did. Now my game is not paused when I press play from main menu.

  • @angelsantillan-gil4201
    @angelsantillan-gil4201 Před 4 lety +1

    Hey man just want to say you have some great tutorial videos and you have really helped me out a lot this year. I'm new to unity and I'm studying video game design at CSU Chico and your tutorial videos have helped me significantly! Both for class and for learning overall. Thank you so much! I have subscribed and liked all of the tutorial videos I've watched from you. thank you so much, I know these videos are two years old an I'm barely watching them but they have been very helpful non the less! So, once again, thank you and I am grateful there are people like you in this world willing to share their knowledge and help others like me.

  • @WibleWobble
    @WibleWobble Před 2 lety

    best unity tutorials i have seen. Beginner friendly, and cover like basically everything you need to make a really good game

  • @pierceb-in2rj
    @pierceb-in2rj Před 6 lety +601

    12 minutes long, posted 3 minutes ago, people already saying thanks

    • @MohanABK
      @MohanABK Před 6 lety +102

      Cause it's Brackeys. You know it's going to be a good tutorial.

    • @lbstester
      @lbstester Před 6 lety +1

      blog not found

    • @fusion610
      @fusion610 Před 6 lety +1

      blog has been removed

    • @bobsagget823
      @bobsagget823 Před 5 lety

      5:53 -5:57 you literally CANNOT do this. It doesn't work.
      Compiler error CS0120: An object reference is required for the non-static field, method, or property 'pauseMenuUI'
      Why show us techniques that DON'T WORK?s

    • @kmonty2009
      @kmonty2009 Před 5 lety

      @@bobsagget823 I just did this and it works fine. Not sure why you are running into errors but mine is fine.

  • @thecoolguy9364
    @thecoolguy9364 Před 3 lety +9

    10:23 The "Yay" made me smile

  • @emeralaxy850
    @emeralaxy850 Před 5 lety

    Ok, you are now my favourite CZcamsr, EVERY. SINGLE. VIDEO, on this messed up my game with so many errors and now you fixed it, thank you so much

  • @shonkylovesgaming1766
    @shonkylovesgaming1766 Před 6 lety

    Your tutorials are really awesome and easy to understand ! Keep it up ! You encourage alot.

  • @elizabethcstudios8703
    @elizabethcstudios8703 Před 3 lety +3

    Thanks for everything you have done man. You're really helping me through college and its sad to see you leave. just know you will always be in our hearts.

  • @olegfrolovdesign
    @olegfrolovdesign Před 5 lety +4

    Лучший канал с уроками по Unity! Спасибо большое!

  • @indigoakaben
    @indigoakaben Před 2 lety

    Your tutorials are simply the best. They always work; I am never confused; you explain very clearly. Me am happy.

  • @TheRandomYoYo
    @TheRandomYoYo Před 3 lety

    Cheers mate! You showed me how to much much better keep track of my UI buttons and add the proper functionality to them. Have spent about 8 hours so far over 2 weeks trying to get the UI to be decent and this solved all my problems in about 30 mins. Many thanks!

  • @yuvaldamti973
    @yuvaldamti973 Před 4 lety +10

    Thank you so much! I'm in 2020 participating in the game jam you host and your tutorials are saving me again and again every time I make mistakes/want to add stuff I don't know how

  • @hamzahahmad1670
    @hamzahahmad1670 Před 6 lety +4

    Great stuff as always.
    If you take requests, can you please make a tutorials explaining Quaternions and their functions or maybe event triggers? Thanks

  • @shay-170
    @shay-170 Před 2 lety

    wow 3 years later and your tutorials are still so helpful!

  • @RemiStorms
    @RemiStorms Před 6 lety

    Looking forward to the video with the story that started all !!! Kudos, great channel !

  • @onlywatch8417
    @onlywatch8417 Před 6 lety +7

    Verry good tutorial for begginers. Nice work ;)

  • @christinaeneroth675
    @christinaeneroth675 Před 5 lety +180

    You can make a Quit button that functions in the editor to, by making it end play mode.
    public void Quit()
    {
    #if UNITY_EDITOR
    UnityEditor.EditorApplication.isPlaying = false;
    #else
    Application.Quit();
    #endif
    }

    • @NickFarrow
      @NickFarrow Před 5 lety +26

      I had a little issue with Unity 2017 ended up using this the code below. Hope this helps someone.
      public void QuitGame(){
      Debug.Log ("You have quit the game");
      if (UnityEditor.EditorApplication.isPlaying == true) {
      UnityEditor.EditorApplication.isPlaying = false;
      } else {
      Application.Quit ();
      }
      }

    • @AAboardCo
      @AAboardCo Před 4 lety +4

      Nick Farrow it did thank you!

    • @explior6558
      @explior6558 Před 4 lety +3

      @@NickFarrow thank you, that is really cool!

    • @vertex_frazix2988
      @vertex_frazix2988 Před 3 lety +1

      KING

    • @star-devil9157
      @star-devil9157 Před 3 lety

      @@aurich172 thanks it worked for me 😍😍😍❤❤❤

  • @mattqson122
    @mattqson122 Před 5 lety

    I just connect to youtube to check for a video in pause menu and start menu thanks so much for those and all the other tutorial video. So much quality 1000 time thank you Brackeys!

  • @blush5868
    @blush5868 Před 2 lety

    Thanks for these videos, you are always to the point and very easy to follow! Subscribed

  • @cubyte4640
    @cubyte4640 Před 4 lety +8

    Notice that if you stop time with Time.timeScale = 0f, it doesn't run back if you reload scene so if you are creating a button for restart then make sure to run the time in Start() by using Time.timeScale = 1f

  • @uasoni...
    @uasoni... Před 4 lety +8

    I literally paused the video at 10:04 and then spent basically 2 hours of my life trying to figure out why everything was being weird.
    I learnt my lesson.

  • @nagybalint1474
    @nagybalint1474 Před 4 lety +1

    still amazing as always its been 3 years yet this is still very helpful

  • @HappyMatt12345
    @HappyMatt12345 Před 4 lety

    Still the only Unity tutorial channel I ever manage to properly learn stuff from.

  • @VictoriaStobbie
    @VictoriaStobbie Před 5 lety +203

    I don't know why Brackey didn't run into this problem too, but in order to not start the game paused you do:
    void Start () {
    PausePanel.SetActive(false);
    }

    • @trystan8011
      @trystan8011 Před 5 lety +4

      OnceThereWasAPageWithAReallyLongAssNameAndNowYouAreLookingAtAChannelWithAReallyLongName! Thanks I just finished and I had the same problem it helped

    • @VictoriaStobbie
      @VictoriaStobbie Před 5 lety +4

      @@trystan8011 No way, really. Well I'm glad it helped mate. And good luck to you and your game making journey.

    • @trystan8011
      @trystan8011 Před 5 lety

      OnceThereWasAPageWithAReallyLongAssNameAndNowYouAreLookingAtAChannelWithAReallyLongName! Thanks for the reply and also thanks for the help!

    • @andrewm6984
      @andrewm6984 Před 5 lety +9

      for me PausePanel does not exist in the current context. Do I rename it to whatever my pause menu is called?

    • @Ydwin
      @Ydwin Před 5 lety +40

      Or you can disable the PauseMenu in the inspector maybe ?

  • @wokarol
    @wokarol Před 6 lety +10

    Can you make a tutorial about custom input manager with ability to bind keys runtime, and with support for multiple local players?

  • @TheFuturistPodcast
    @TheFuturistPodcast Před 3 lety

    I wish that one day you will comeback with more tutorials. You are the GOAT!

  • @klippok
    @klippok Před 6 lety

    Thanks! Most helpful lessons for unity beginner in youtube.

  • @leomrenders9150
    @leomrenders9150 Před 3 lety +13

    I was torn on the whole animation part, as setting the time scale to 0 would technically also limit animation, but to see there's a drop down that sets the animations time to "unscaled" is a useful piece of knowledge

    • @torn2668
      @torn2668 Před 2 lety

      Yes, you said you were I.

    • @BenGodot
      @BenGodot Před rokem

      How do you do this?

  • @syclonusmusic
    @syclonusmusic Před 6 lety +179

    hi can you make a video for unity UI about LOAD / SAVE saving music and player positions in the game ? thanks

    • @Junior.Nascimento
      @Junior.Nascimento Před 6 lety

      up

    • @thegamingcobra1
      @thegamingcobra1 Před 6 lety +8

      Saving all the game data such as the score. money system, players position, inventory

    • @akashverma4280
      @akashverma4280 Před 6 lety +1

      Pausing music using IEnumerations is such a pain in ass. Looking for a way to do it...

    • @theairaccumulator7144
      @theairaccumulator7144 Před 6 lety +3

      +DJ Syclonus Try using PlayerPrefs(saves stuff in registry(okly secure and simple to use)) or text files(saves stuff in simple txt files(really hackable and super easy to use)) or custome binary files(saves stuff in custom binary complex files(unhackable and really hard to set up but easy to use afterwords)). You can search for one or all of those options on the internet to see how they work and how to setup and use them.

    • @lostconflict9369
      @lostconflict9369 Před 6 lety +8

      Why is everyone here so narrow, everyone's asking for something but i doubt they even searched for it, if they did. They wouldn't be asking so desperately, here are some links, use them if you want. And if you don't, it's on you, since no one cares.
      czcams.com/video/sWWZZByVvlU/video.html
      czcams.com/video/6vl1IYMpwVQ/video.html

  • @BattleAngelSound
    @BattleAngelSound Před 6 lety

    Man you're the BOSS! :D Thanks to you my uni project that is audio focused will be much much more than just basic '4 objects' level :)

  • @IkeVoodoo
    @IkeVoodoo Před 4 lety

    Brackeys is the best! Anybody who dislikes just dont know how to fix errors that they encounter and expect that brackeys told them something fake, somethimes just try yourself in fixing, it is a great way to learn :D

  • @linshu6141
    @linshu6141 Před 4 lety +7

    If u also have the "2D Shooting in Unity (Tutorial)" from Brackeys in ur game just change the "void Start()" method in the "Bullets" script to this:
    void Start()
    {
    rb.velocity = transform.right * speed;
    if (PauseMenu.GameIsPaused)
    {
    Destroy(gameObject);
    }
    }
    Now u don't stack up ur bullets if clicking in the pause menu.

  • @aleksp8768
    @aleksp8768 Před 4 lety +3

    This was very helpful but when I exported the game as a build, the pause menu didn't work. Do you have any idea what might've caused that? Also, the pause menu worked perfectly in Unity
    Edit: Ok I think I found the problem, I was using FixedUpdate instead of Update (idk why I must've gotten confused with another tutorial)

  • @charliebrown3118
    @charliebrown3118 Před 6 lety

    awesome vid! very helpful, and is explained neatly, good job man

  • @botcomborderreaching3518

    You are god. I spend 2 hours trying to spawn buttons in my game, but I really didnt know that I cant just create them and just deactivate them. Thank you so much man!!!!!!!

  • @ihavecreatism9776
    @ihavecreatism9776 Před 4 lety +6

    First, thanks for your help. Second...
    I tried to use this method with the "Cancel" Axis,
    but its somehow connected with time.DeltaTime...
    That means, i cant unpause it.

  • @Demon.Immortalis
    @Demon.Immortalis Před rokem +12

    for the Resume() function use this in the beginning:
    Cursor.visible = false;
    Cursor.lockState = CursorLockMode.Locked;
    for the Pause() function use this in the end:
    Cursor.lockState = CursorLockMode.None;
    Cursor.visible = true;
    your welcome ;)

    • @andreezz
      @andreezz Před rokem

      UR A GOAT TYYYYYYYYYYYYYYYYYYYYYYY

    • @muscatalexj
      @muscatalexj Před rokem

      You beautiful man. Saved me so much frustration.

    • @Demon.Immortalis
      @Demon.Immortalis Před rokem

      @@muscatalexj ofc ur welcome :)

    • @GOF313
      @GOF313 Před 7 měsíci

      @@Demon.Immortalis Thank you!

  • @Crashlikag6
    @Crashlikag6 Před 2 lety

    I was confused with how to make my game over screen and this helped soooo much thank u brackeys

  • @storiesfromthedarkness3631
    @storiesfromthedarkness3631 Před 6 měsíci

    This video is working 7 years later. Thank you vey much!!!

  • @Superbbsuper
    @Superbbsuper Před 5 lety +6

    Was stuck wondering this for a bit cuz im a newb but TIP if your pause UI is there at the start of your game dont forget to disable your pausemenu within unity inspector. thats why we have the getkeydown for esc, to re-enable it....I feel dumb lol

  • @SchematicGV
    @SchematicGV Před 3 lety +76

    Brackeys: makes a start and pause menu tutorial free
    Other people: Pay $500 to learn to make a start menu

    • @MarkoBrainz
      @MarkoBrainz Před 3 lety +8

      not really..

    • @lr514
      @lr514 Před 3 lety +3

      Exaggeration in order to make a point to make something funnier

    • @bonzodimduly
      @bonzodimduly Před 2 lety +3

      your logo has my logo in it

    • @honorsoftentertainment484
      @honorsoftentertainment484 Před 2 lety

      There's other free pause tutorials, and better (not all though). Also, notice how many people have problems with the code and setup? It appears to work in the video but does not work with out a few fixes and modifications, so that's why some people pay for better info... "there's a reason why it's free."

  • @FirroLP
    @FirroLP Před 6 lety +1

    Hey Brackeys, really enjoy these UI Videos since I have to do many of them for my kind of games and I wanted to ask if you could make some tutorial on how to make a UI responsive for different screen sizes and more specifically Aspect Ratios. Most resources I find and people I ask are not as good as they could be. Much love to you and always happy to learn from you

  • @freemanfitness3064
    @freemanfitness3064 Před 3 lety

    Thank you for this tutorial! Very useful and looks great too!

  • @Spence.1
    @Spence.1 Před 4 lety +79

    My Pause Menu working 100% as intended from the video:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;
    public class PauseMenu : MonoBehaviour
    {
    public static bool GameIsPaused = false;
    public GameObject pauseMenuUI;
    void Update()
    {
    if (Input.GetKeyDown(KeyCode.Escape))
    {
    if (GameIsPaused)
    {
    Resume();
    } else
    {
    Pause();
    }
    }
    }
    public void Resume ()
    {
    pauseMenuUI.SetActive(false);
    Time.timeScale = 1f;
    GameIsPaused = false;
    }
    void Pause ()
    {
    pauseMenuUI.SetActive(true);
    Time.timeScale = 0f;
    GameIsPaused = true;
    }
    public void LoadMenu()
    {
    Time.timeScale = 1f;
    SceneManager.LoadScene("Menu");
    }
    public void QuitGame()
    {
    Debug.Log("Quitting game...");
    Application.Quit();
    }
    }

  • @Nox__
    @Nox__ Před 4 lety +69

    I used it to also make a ZA WARUDO sound effect when clicking on pause just for fun

    • @dynamicsketch
      @dynamicsketch Před 4 lety +1

      That's awesome.

    • @pitbull2498
      @pitbull2498 Před 3 lety +9

      Who are you, so wise in the ways of science

    • @h.k654
      @h.k654 Před 3 lety +1

      @@pitbull2498 An anonymous genius.

    • @eddybplayz4801
      @eddybplayz4801 Před 3 lety

      i dislike the anime

    • @Nox__
      @Nox__ Před 3 lety

      @@eddybplayz4801 why?
      You cant blame me every person has its own likes

  • @BrendixQueenWN
    @BrendixQueenWN Před 6 lety

    Thaaaaaaank you so much for this tutorial. Just what I was searching!!!

  • @SreyRc
    @SreyRc Před 4 lety +2

    Humanity is blessed to have you. Thank you so much!

  • @et9296
    @et9296 Před 3 lety +4

    If anyone is having trouble with the pause menu, and can not re-enable the menu one you resume, try moving the script to a different GameObject. I believe that if a GameObject is disabled, the scripts do not run, so if you put the script on the pause menu while it is disabled it will not call the function.

  • @isimplydonthaveaname9994
    @isimplydonthaveaname9994 Před 4 lety +7

    YES YEEESSS A PAUSE MENU WHAT I NEED YEEEEEEESSSS thank you brackeys
    Also text mesh pro is already in my unity so I don't need to download it
    Haha sublime text 3 go brrrrrrrrr

  • @rayaneben
    @rayaneben Před 6 lety

    Great tutorial, really well explained !

  • @birderwang
    @birderwang Před 5 lety

    Very detailed and great explanation, thanks a lot.

  • @gamemaker5459
    @gamemaker5459 Před 4 lety +3

    when i try to click resume button, entire screen is freezing and cursor become invisible(for menu and quit also). What to do?

  • @flashgames1273
    @flashgames1273 Před 6 lety +24

    Already know this shit, but still watching... :D

    • @PingDonger
      @PingDonger Před 6 lety

      Flash Games wanna work on a game?

    • @flashgames1273
      @flashgames1273 Před 6 lety

      sure! add me on discord: mihx #2422

    • @flashgames1273
      @flashgames1273 Před 6 lety

      *1.* really basic c# programming *2.* Intermediate c# + UnityEngine *3.* Unity - playing around *+4.* Official/Brackeys Unity tutorials *5.* first simple game *6.* Unity Answers/Forum/Google - for problems while dev. *7*. However i have no official education with programming/Unity. *8.* Learn as you develop. * important part is the basic c# and UnityEngine... * And dont give up. never. it will look difficult but it is not.

  • @nicholasfacciola6626
    @nicholasfacciola6626 Před 4 lety

    spent two hours on this problem and you fixed it in the first 40 seconds

  • @amanpreetchander7386
    @amanpreetchander7386 Před 2 lety

    Thank you so much Brackeys. Very well explained 🙂

  • @dofyto8622
    @dofyto8622 Před rokem +9

    For those that is having problem with uniteractable button
    Make sure your Canvas habe Graphic Raycaster to the setting is default so you don't need to edit it at all
    you need to make sure that you give the scene a EventSystem
    -RightClick in your project where you usually add text/button
    -Then go to UI, EventSystem will be at the bottom of it

    • @sprinklesprink7192
      @sprinklesprink7192 Před rokem

      thank you for saving me a lot of frustration

    • @lumine881
      @lumine881 Před 7 měsíci

      Thank you so much !

    • @sup179
      @sup179 Před 3 měsíci

      Thanks a LOT!! you helped me save my semester

  • @StephanePiano
    @StephanePiano Před 3 lety +4

    If you are having issues with you Player teleporting on load, make sure that “Auto Sync Transforms” (Edit->Project Settings->Physics) is enabled :)

    • @sedem_quame
      @sedem_quame Před 3 lety +1

      wow, this is super helpful. i was experiencing the problem in android build, and I thought it was a problem with my scripting since I assed some preprocessor directives, for mobile.

  • @Pomyluna99
    @Pomyluna99 Před 4 lety

    This helped me out a lot. Thank you very much!

  • @rajbirsingh2771
    @rajbirsingh2771 Před 4 lety

    they are the best unity lessons on unity . they are much better than any paid courses

  • @GetWilleredLol
    @GetWilleredLol Před 4 lety +10

    Can anyone help me? I'm making a game with mouse movements. But when I click the button it doesn't work. It just sets it to stay in the game again. How do I fix this?

    • @radfish34
      @radfish34 Před 4 lety

      I'm having the same problem. did you ever find a solution.

    • @cjeeckazad2995
      @cjeeckazad2995 Před 4 lety

      Willydd123456 u could fix it by changing the mouse clicking to a another keyword for pausing

    • @GetWilleredLol
      @GetWilleredLol Před 4 lety

      I know. I already fixed it. You just gotta make it dissapear when back in game and reappear when paused.

    • @cjeeckazad2995
      @cjeeckazad2995 Před 4 lety

      Willydd123456 I am happy that you fixed your problem .Wish your success man

    • @JunkDeath
      @JunkDeath Před 4 lety +3

      @@GetWilleredLol how u fixed it i didnt got it :(

  • @MostafaTElmansoury
    @MostafaTElmansoury Před 6 lety +11

    Please make a video on how to map controller support.

  • @pavanpatel9686
    @pavanpatel9686 Před 5 lety

    Thank you sir for all the videos.it helped me a lot thanks once again.

  • @blackphant8399
    @blackphant8399 Před 3 lety

    this video contain so many new information for me. thanks mate, u are awesome!

  • @maiskorrel
    @maiskorrel Před 5 lety +20

    Amazing tutorial! as Always!
    Unfortunately at 7:28 when I try to do this nothing happens the pitch just stays the same while in the pausemenu.

    • @_sidrs
      @_sidrs Před 4 lety

      have you figured it out how to fix it ?

    • @bodewilson7522
      @bodewilson7522 Před 3 lety +3

      Hi! Take a look if you have a script that blocks the mouse, this caused my button not to work or the highlight to appear! I used another video of him where he teaches how to move characters in first person and there he used to lock the mouse, when I commented on this line the menu worked as it should ...

    • @bodewilson7522
      @bodewilson7522 Před 3 lety +1

      @@_sidrs just to see my reply on how I fixed my problem

    • @_sidrs
      @_sidrs Před 3 lety +1

      @@bodewilson7522 haha thanks man, I'll take a look at it.

    • @whereistheguru.
      @whereistheguru. Před 2 lety

      Same problem ;( Did you manage to find a solution?

  • @KayleeVRC
    @KayleeVRC Před 4 lety +4

    It works in the Main Menu, but when i open the game it doesn't let me interact with the buttons anymore .-.

  • @bonfaceosuka
    @bonfaceosuka Před 3 lety

    Thank you so much Brackeys , it worked perfectly

  • @OtakuUnitedStudio
    @OtakuUnitedStudio Před 5 lety

    Thank you for the video! I am working on a 2D space shooter and I didn't really have to change anything to get this to work.

  • @connorbrush5626
    @connorbrush5626 Před 4 lety +10

    For anyone having an issue with your player not moving and overall your game not moving when you load back to your game after quitting once before (loading the same scene twice):
    In the LoadMenu() method, before loading the menu scene, set the time scale back to 1f using Time.timeScale = 1f;
    Otherwise, when you load back in, the timeScale remains 0f and nothing works until pausing and unpausing, which wouldn't be good.
    Edit:
    Also set the GameIsPaused variable to false before loading the menu scene, that way you don't have to double-tap escape when you go back in because the game thinks it is paused.

  • @PhycoSerpentStudios
    @PhycoSerpentStudios Před 3 lety +6

    Why doesn't the menu work anymore when you go to a new scene? I've even tried making a prefab of the canvas and I can't seem to figure out why it isn't working

    • @PhycoSerpentStudios
      @PhycoSerpentStudios Před 3 lety +10

      Turns out, every scene needs an event system, which is required for events such as onClick(which is what the button uses)
      So what i did was placed the event system inside the canvas as a child object.

    • @Xiaolin2
      @Xiaolin2 Před 3 lety +1

      @@PhycoSerpentStudios Thanks so much!!

    • @prodxuv
      @prodxuv Před 3 lety +1

      @@PhycoSerpentStudios YOU ARE A LEGEND :)

  • @user-hu1cf6tf1p
    @user-hu1cf6tf1p Před 5 lety +2

    I was wondering: do you just make a new canvas inside the "Menu" scene you made in one of the previous videos or do you first need to make a new scene and then make a canvas inside it?

  • @TheWizard991
    @TheWizard991 Před rokem

    These videos are pure gold. I've made a game called Jumpy Cube.

  • @vadympetruk3449
    @vadympetruk3449 Před 6 lety +11

    Thanks a lot!
    Pls make a video about RectTransform management (how to create game UI for 'any' resolution)

    • @AlmostM
      @AlmostM Před 6 lety +3

      +1 to this. I sort of understand how the UI anchors and scaling modes work, but I still get confused about how I should be using them.

  • @hovhadovah
    @hovhadovah Před 5 lety +15

    Since the flag is a static boolean, you'll need to set it to false when you load the menu. Otherwise, when you load the menu and re-load the game, you won't be able to bring up the pause menu.

    • @leanforever7814
      @leanforever7814 Před 2 lety +1

      save me

    • @tech-boy334
      @tech-boy334 Před 2 lety

      Nah not for me atleast, maybe its a bug on your side

    • @RaasiqShaikh98
      @RaasiqShaikh98 Před rokem

      Hey I am onlu able to pause once. once I close the Pause menu it doesnt open again, what do I do ?

  • @babarasul680
    @babarasul680 Před 6 lety

    Man, you are such a solid dude. Thanks a bunch.

  • @SlayerFoxX
    @SlayerFoxX Před 5 lety +2

    Dude damn you for doing all these helpful tutorials

  • @gory_t4293
    @gory_t4293 Před 2 lety +3

    If anyone has a problem with buttons and time.timescale= 0; I found a solution, my problem was with (update mode), so..
    1/in the script add (using UnityEngine.InputSystem)
    2/in method (pause game) u should add (InputSystem.settings.UpdateMode = InputSettings.UpdateMode.ProcessEventsInDynamicUpdate;),
    3/in method(resume game) add (InputSystem.settings.UpdateMode = InputSettings.UpdateMode.ProcessEventsInFixedUpdate;)
    I don't know if this is the right way to solve it but it works perfectly on play mode:).

  • @frazebean5117
    @frazebean5117 Před 3 lety +4

    If you guys have an issue in which restarting the level results in you needing to press 'ESC' twice to bring up the pause menu, remove 'static' in the first line of the code:
    public static bool GameIsPaused = false;
    End result would be:
    public bool GameIsPaused = false;

  • @jeffhan4119
    @jeffhan4119 Před 6 lety

    Awesome! This guy should deserve more views.

  • @PressTech
    @PressTech Před 6 lety

    Big Man helping us as always

  • @7oledit399
    @7oledit399 Před 3 lety +218

    Who is here after sad announcement?

  • @loki8031
    @loki8031 Před 6 lety +9

    Heeeeelp, when im returning from the game to the menu, when im in the menu the mouce is invisivle, why?? What i cant do to see it? Help please!

    • @mariogamer6621
      @mariogamer6621 Před 5 lety +10

      In your resume code, add these lines:
      Cursor.visible = true;
      Cursor.lockState = CursorLockMode.None;
      And it should work
      Edit: pause code

    • @OtakuUnitedStudio
      @OtakuUnitedStudio Před 5 lety

      @@mariogamer6621 Thank you! I was about to start looking into how the cursor can be manipulated but that was enough to get me started.

    • @Frosfector
      @Frosfector Před 5 lety +1

      I put like you did and I could not solve the mistake. Can you pass your script to me?

    • @OtakuUnitedStudio
      @OtakuUnitedStudio Před 5 lety

      @@Frosfector Minor correction: put the cursor code Mario Gamer put here in the Pause() function and just for good measure you can also add it to the function to return to the menu.

    • @Frosfector
      @Frosfector Před 5 lety +1

      @@OtakuUnitedStudio Thanks but I've already solved the problem, thank you very much.

  • @camsolo2024
    @camsolo2024 Před 6 lety

    Thanks. What more can I ask for? This is great!! Thanks, Brackeys!

  • @florianmisof1988
    @florianmisof1988 Před 6 lety

    Yes man, you saved my day!
    Thanks a lot.