6 Minute PAUSE MENU Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 290

  • @moosicaa
    @moosicaa 2 ปีที่แล้ว +113

    Make sure to put isPaused = false; at the end of the GoToMainMenu function, so that you can enable inputs if you decide to click play in the main menu!

    • @alehunter15
      @alehunter15 2 ปีที่แล้ว +5

      Thank you for this comment!

    • @lucasquaroni3120
      @lucasquaroni3120 2 ปีที่แล้ว +5

      THANk YOU

    • @austinschaefer804
      @austinschaefer804 6 หลายเดือนก่อน +1

      I copied the code to the T and I keep getting errors like 'Time' does not contain a definition for 'timescale'. 'PauseMenu.isPaused' cannot be used like a method. And Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement. WHAT DO I DO?

    • @zeus_logical
      @zeus_logical 5 หลายเดือนก่อน

      @@austinschaefer804 idk

    • @Mccev_Roric
      @Mccev_Roric 4 หลายเดือนก่อน

      @@austinschaefer804 Are you still having trouble? If so, show me your script, I may be able to spot the issue, but I need the script.

  • @Feinei
    @Feinei 4 ปีที่แล้ว +23

    Thanks for making it simple and to the point. I appreciate the lack of useless filler that most people go for

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +3

      Thanks for the kind feedback!

  • @tobysto
    @tobysto 4 ปีที่แล้ว +46

    having a youtuber that makes content on exactly what i need and in 2020 is godly. thanks!

  • @ik0nino
    @ik0nino 4 ปีที่แล้ว +30

    your videos are super well made, beginner friendly, and perfect for game jams! please continue making tutorials!

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +3

      That makes me really happy you think that, no plans to stop yet!

    • @shaiai6510
      @shaiai6510 4 ปีที่แล้ว

      @@BMoDev I 100% agree with this guy, every question i've had in the past 24 hours your channel has answered in the most accessible way. Thank you!

  • @martinlahitou710
    @martinlahitou710 4 ปีที่แล้ว +13

    Tip: If your pause menu spams like a minigun when you press Escape, you can change the if (Input.GetKey(KeyCode.Escape)) to if (Input.GetKeyDown(KeyCode.Escape)).

    • @alehunter15
      @alehunter15 2 ปีที่แล้ว

      hahahah epic comment!
      +i want to thank you for this gem! I have been trying for hours to fix it!

  • @loganfowler777
    @loganfowler777 3 ปีที่แล้ว +1

    bro finna be honest THIS GUY SOUNDS AWESOME his voice is so calming and soothing. Never got a more awesome experience from coding thanks man.

    • @BMoDev
      @BMoDev  3 ปีที่แล้ว

      Thats crazy to me, but I appreciate it 💙

  • @sophiedaisy2024
    @sophiedaisy2024 ปีที่แล้ว +3

    thank you so much for sharing your videos with us, I feel like I honestly learn more from you than the coding courses I've been taking !! You're very good at what you do :)

  • @zainkheraj4989
    @zainkheraj4989 4 ปีที่แล้ว +14

    these tutorials are so useful for my game development, keep up the great content

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +3

      This really makes me happy to hear! Will do my best 🙏 I want more people bringing their ideas to life!

  • @pavelpavel4029
    @pavelpavel4029 ปีที่แล้ว +1

    Even though you had project of yours that has already been nearly completed, you've successfully shown my dumb ass how to solve this particular "problem". Thank you so much

  • @brejnastore
    @brejnastore 3 ปีที่แล้ว +14

    Tip: you actually cant put script everywhere u want (not on PauseMenu because script wont work if u disable gameobject :D)

    • @thomashoger5548
      @thomashoger5548 ปีที่แล้ว

      Good advice, i had that problem n now i know how to solve it. Thanks

  • @Chrissspyy
    @Chrissspyy 4 ปีที่แล้ว +7

    i followed brackeys tutorial on the same topic and it wouldnt work for me! i tried this one and it worked perfectly! thank you so much! im new to programming and video game development and your video just helped me out alot... you just gained a sub

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +1

      Happy to hear it! Keep it up!

    • @Chrissspyy
      @Chrissspyy 4 ปีที่แล้ว

      BMo thanks!

    • @alexthompson8977
      @alexthompson8977 2 ปีที่แล้ว +1

      @@BMoDev for some reason the player is blocking the pause menu buttons from working

  • @RandomDude00001
    @RandomDude00001 6 หลายเดือนก่อน

    I wish all tutorials were like this you know very short direct to the point and entertaining.

  • @cristhinareyes9108
    @cristhinareyes9108 2 ปีที่แล้ว +6

    Hey, so idk if youll see this but , My problem is that when the game is up the text choices "resume , quit " etc are overlayed on the game and it wont disappeared . they do work when I hit esc and the paused title comes up but the choices never leave?

  • @Ayyouboss
    @Ayyouboss 4 ปีที่แล้ว +3

    Why the hell are you so underrated? These are some straight on point Tutorials man! Thanks

  • @LegendaryNassa
    @LegendaryNassa 3 ปีที่แล้ว +7

    Make sure that you change isPaused bool to false in the Main menu function, otherwise your controls will be locked when you play again

    • @savokar
      @savokar 2 ปีที่แล้ว +2

      thanks i'll trying all day to find out

  • @Emilis2023
    @Emilis2023 ปีที่แล้ว +3

    Perfect, thanks! I'm just starting with all this and being able to set the timescale was the piece of the puzzle I was missing. Until now I had been setting a bool for "canMove" to false and wrapping it around every single movement command on my character but I was wondering what I would do about enemies and other environmental objects. I knew I could always give them something similar, but then having to tie all that in to a player pressing a key seemed awfully excessive. This looks like a much better solution!

    • @Emilis2023
      @Emilis2023 ปีที่แล้ว +2

      Now that I think about it, I guess this is also where you could add a feature like Rimworld has where you have multiple play speed buttons or special effects like time slowing when you get hit with a fatal blow. Really good to know!

  • @t.c4969
    @t.c4969 3 ปีที่แล้ว +4

    Hi, I'm just wondering I don't have a game manager and I don't know where to put the script so it's not working could you please tell me how where to actually put the script if I don't have a game manager?

  • @Rob-fi2pe
    @Rob-fi2pe ปีที่แล้ว +1

    This is perfect. Thank you for the efficient rundown!

  • @Nana-nt1ix
    @Nana-nt1ix 3 ปีที่แล้ว +6

    Is "pauseMenu" the name of an existing object or is it assigned to the menu by the script?

  • @minna633
    @minna633 4 ปีที่แล้ว +1

    Thanks for the tutorial ! It's very nice and I really needed that !!
    Looking forward your next 5min videos !!

  • @peperoni06460
    @peperoni06460 4 ปีที่แล้ว +1

    again, i search "Unity 2d pause menu" and the second video is this one, like the other, i'm not disappointed, i think i'm going to subscribe x)

    • @peperoni06460
      @peperoni06460 4 ปีที่แล้ว

      I just have a little probleme, when i click on "resume" the first time, the next time i open the pause menu, if i press space the pause menu closed, even if my "space" button don't serve any purpose, not a big deal, but i'm curious to know why

  • @jerozero755
    @jerozero755 3 ปีที่แล้ว +1

    Dude you are my new god, thank you so much :D

  • @happyshabbygames
    @happyshabbygames ปีที่แล้ว

    You're the Goat. Helped me out a ton.

  • @MajesticMindGames
    @MajesticMindGames 2 ปีที่แล้ว

    You're a beautiful human being Mr.BMo.

  • @MemesButSpicy
    @MemesButSpicy 4 ปีที่แล้ว +7

    And you can qui...
    Im learning with your tutorials thanks a lot :)

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +2

      Awesome, keep it up!

  • @VoiD90009
    @VoiD90009 2 ปีที่แล้ว +3

    When I press escape pause menu doesn't show up any solution?🥺

  • @inmartinezt
    @inmartinezt หลายเดือนก่อน

    Hello there,
    I don't know why but my button to return to the menu works again but when I start the game again the assignment in On Click ( ) is lost, I don't understand, it worked once, and the second time I try to play it doesn't work Start?

  • @goldsucher8578
    @goldsucher8578 3 ปีที่แล้ว +6

    5:48 what is my gameManager ? the Camara ?

    • @ignamunozbianchiBIM
      @ignamunozbianchiBIM 5 หลายเดือนก่อน

      "gameManager" usually refers to an empty object where you asign all your codes in the scene (not related to the character or that kind of specific features). It function is to be the object that you will always call to make a code function work, in this case, to change your scene depending on the button you´re pressing.
      Its depends on you to give it to a principal camera or to an empty object tho

  • @felizeumida4374
    @felizeumida4374 ปีที่แล้ว +1

    I've used your code to make a death screen, but when i die my mouse doesn't show up, do you know why this is?

  • @imlarahi4255
    @imlarahi4255 4 ปีที่แล้ว +5

    Hey, great tutorial! I was wondering if there's a way to stop the Standard Assets FPS Controller from letting the player still move the camera around when the pause menu is up, haven't been able to figure it out myself. Thank you!

    • @PlatapusStudios501
      @PlatapusStudios501 2 ปีที่แล้ว +2

      Cursor.lockState = CursorLockMode.None;
      Cursor.visible = true;
      player.SetActive(false);

  • @JonelKingas
    @JonelKingas ปีที่แล้ว +2

    im using both youtube tutorials and chatgpt both help a lot. first i get what i want on youtube than expand with chatgpt, and im actually learning.

  • @romeprince11
    @romeprince11 2 ปีที่แล้ว +2

    Doesn't work for me im getting and issue with assigning it to a game object
    The game is freezing when I hit esc but there is no menu popup
    Im trying to figure it out right now but there's an issue with setting the script to something, and then putting something as a the gameobject for pausemenu
    Edit - I believe it has something to do with the camera settings
    Edit 2 - Yes it was the canvas, once I set it to follow the camera it made my already small menu microscopic.
    So I saved a copy of the panel, made the change, then repasted the panel and it's perfect. Now my pause menu follows my camera screen which is what I wanted.
    You need to set the pausemenu as a gameobject in the pause menu script
    Edit 3 - You cannot call PauseMenu from another CS script it does not exist
    You have to import it

  • @OKAYGUVBear
    @OKAYGUVBear 4 ปีที่แล้ว +2

    Thank you so much for this, you´re a life saver!

  • @lshc0304
    @lshc0304 ปีที่แล้ว +1

    for those who have issue with UnassignedReferenceException error, go chack out "PAUSE MENU in Unity" by Brackeys, he did it in a slightly different way and it works

  • @monkeypwners
    @monkeypwners ปีที่แล้ว

    This helped me so much thank you kind stranger

  • @wahl7890
    @wahl7890 3 ปีที่แล้ว +1

    'PauseMenu' does not contain a definition for 'isPaused'-error is popping up. how do i fix this?

  • @riniton9217
    @riniton9217 4 ปีที่แล้ว +3

    very quick and to the point, I appreciate that :]

  • @motox4577
    @motox4577 4 ปีที่แล้ว +1

    So I have a fade into scene ui in my project, and so now my buttons don’t press because of it. Anyway to fix this? Thanks

  • @sebz0h
    @sebz0h 3 หลายเดือนก่อน

    Thank you! But I have a question. The game that I'm making is for Android and for making the game in pause I have to click a button with a clicking function. I putted that but when I press the button the player jumps because of the function that is *if(Input.GetMouseButtonDown(0) && canJump)*.
    That is a disturbing thing because when I want to pause the game the player jumps. If you could help me I would be rrally grateful!

  • @DoDoCardoso
    @DoDoCardoso 3 ปีที่แล้ว +1

    When i go to "on click()" - button i dont have the options that u have

  • @nootnot4548
    @nootnot4548 2 หลายเดือนก่อน

    oh my god it works thanks!!

  • @weckar
    @weckar ปีที่แล้ว +1

    While this method is great for tiny games, hard setting the timescale will often lead to issues in larger games.

  • @drewity
    @drewity ปีที่แล้ว

    Amazing tutorial. Many thanks!!

  • @cool_gamertag4488
    @cool_gamertag4488 2 ปีที่แล้ว

    I came across this video and it helped fix a bug in my pause menu so THANK YOU =>

  • @carlosrd9901
    @carlosrd9901 ปีที่แล้ว

    Thank you!! Your videos are awesome

  • @mohammadumarsajid8214
    @mohammadumarsajid8214 ปีที่แล้ว

    why my functions (pauseGame(), resumeGame()) are not appearing in inspector when on click() .. i have put the the script in separate gameobject and applied this game object in on click() .. still not functions of the script appearing, why?

  • @ayushsinghchauhan9558
    @ayushsinghchauhan9558 ปีที่แล้ว

    ThankYou so much dude your vids been helping out a lot recenly

  • @TomasPower123
    @TomasPower123 7 หลายเดือนก่อน

    if i was making a 3D game how would i stop my camera from moving around when im in the menu

  • @davidspurny3384
    @davidspurny3384 4 ปีที่แล้ว +3

    Smashed the like as hard as I could have

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +2

      My man 🙏

    • @tobysto
      @tobysto 4 ปีที่แล้ว

      *smash that like button two times!*

  • @eggseatpegs
    @eggseatpegs 3 ปีที่แล้ว +1

    im using the same version as you and before you did the static ball and yeah in my 3d it doesnt work

  • @nish3003
    @nish3003 ปีที่แล้ว

    how could i make a pause menu for a multiplayer fps game? because when I press escape, the cursor still moves my camera for whatever reason, even if I have an if else condition in place to prevent that

  • @unluckyaf7673
    @unluckyaf7673 4 ปีที่แล้ว +3

    UnassignedReferenceException: The variable pauseMenu of PauseMenu has not been assigned.
    You probably need to assign the pauseMenu variable of the PauseMenu script in the inspector.
    PauseMenu.PausedGame () (at Assets/Scripts/PauseMenu.cs:35)
    PauseMenu.Update () (at Assets/Scripts/PauseMenu.cs:23)

    • @tobysto
      @tobysto 4 ปีที่แล้ว

      just assign the variable

    • @TBag-xl9qz
      @TBag-xl9qz ปีที่แล้ว

      How i can do this?

    • @TBag-xl9qz
      @TBag-xl9qz ปีที่แล้ว

      ​@@tobystohow?

    • @unluckyaf7673
      @unluckyaf7673 ปีที่แล้ว +2

      Oh my god, it's been 3 fucking years, I was so dumb bro 😂

    • @unluckyaf7673
      @unluckyaf7673 ปีที่แล้ว

      @@TBag-xl9qz google "how to assign a variable in C#" or in these days ask chatgpt

  • @adfaawda3798
    @adfaawda3798 4 ปีที่แล้ว +1

    Awesome tutorial. I have a pause menu now.

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +1

      Nice work!

  • @Skellens
    @Skellens 4 ปีที่แล้ว +4

    Can you make a gameover menu thing couse i'm stuck with things like that

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +2

      Sure, I'll add it to my backlog

  • @Cjoudan
    @Cjoudan 2 ปีที่แล้ว

    thank you for this great video, plain and simple!

  • @bluecrazyclown._.9865
    @bluecrazyclown._.9865 ปีที่แล้ว

    Hi- I’m using SC_FPSController script and I can’t freeze the the camera moving with the mouse (so can’t stop player movement)
    Should I unconnected them so solve that??

  • @FNAFgorilla
    @FNAFgorilla ปีที่แล้ว

    Hi my script isnt working and would like help my script is making the buttons work

  • @semiuodunayoadebayo6299
    @semiuodunayoadebayo6299 11 หลายเดือนก่อน

    Thanks a lot, much appreciated

  • @mcleverm01
    @mcleverm01 2 ปีที่แล้ว

    Thanks! Good video!

  • @FeeFox
    @FeeFox 2 ปีที่แล้ว

    Helped so much! 👍

  • @lokine421
    @lokine421 2 ปีที่แล้ว

    How do you fix it so it works after you have buildt and run the game? Only works in game tab in the editor but not in the buildt version

  • @augustoliver715
    @augustoliver715 2 ปีที่แล้ว

    I know this video is super old and no one cares, but is the audio from the beginning from Juice Universe? (I believe that's what it's called now after it got renamed)

  • @ezzyrappeport8856
    @ezzyrappeport8856 3 ปีที่แล้ว

    ok but now how do i make it work... like i do make pressing the quit game button quit the game and make the resume game resume it when you click it or the back to menu take me to the main menu

  • @thegymteachersgrandma
    @thegymteachersgrandma ปีที่แล้ว

    I'm using this for a VR game, however with this script i cannot interact with the buttons, without the script i can. Any ideas how to fix that?

  • @12ksa4
    @12ksa4 ปีที่แล้ว +4

    for Standard first person controller assets store
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;
    using UnityStandardAssets.Characters.FirstPerson;
    public class PauseMenu : MonoBehaviour
    {
    public static bool GameIsPaused = false;
    public GameObject player;
    public GameObject pauseMenuUI;
    [Header("it hides your hud when you Pause")] // example | "E" to open door |
    public GameObject HUD;
    private void Update()
    {
    if (Input.GetKeyDown(KeyCode.Escape))
    {
    if (GameIsPaused)
    {
    Resume();
    }
    else
    {
    Pause();
    }
    }
    }
    public void Resume()
    {
    pauseMenuUI.SetActive(false);
    Time.timeScale = 1f;
    GameIsPaused = false;
    player.GetComponent().enabled = true;
    Cursor.visible = false;
    Cursor.lockState = CursorLockMode.Locked;
    HUD.SetActive(true);
    }
    public void Pause()
    {
    pauseMenuUI.SetActive(true);
    Time.timeScale = 0f;
    GameIsPaused = true;
    player.GetComponent().enabled = false;
    Cursor.visible = true;
    Cursor.lockState = CursorLockMode.None;
    HUD.SetActive(false);
    }
    public void LoadMenu()
    {
    Time.timeScale = 1f;
    SceneManager.LoadScene("MAINMENU");
    GameIsPaused = false;
    player.GetComponent().enabled = false;
    Cursor.visible = true;
    Cursor.lockState = CursorLockMode.None;
    }
    public void QuitGame()
    {
    Debug.Log("Quitting game...");
    Application.Quit();
    }
    }

    • @bob32423
      @bob32423 6 หลายเดือนก่อน

      Ty you are very cool :)

    • @12ksa4
      @12ksa4 6 หลายเดือนก่อน

      @@bob32423 np ;)

  • @JoaoVitor-oc3xq
    @JoaoVitor-oc3xq 4 ปีที่แล้ว +2

    Someone help me please! is giving the error: "The name (Principal) is not in the context csharpCS0103".
    This code would be to change the scene, in this case it would be for the Main Menu scene, I changed the scene name to "Principal" but it will not go at all!

    • @onx99
      @onx99 4 ปีที่แล้ว

      That could be referring to the UI element.

    • @gamer-revolution
      @gamer-revolution 3 ปีที่แล้ว

      That happend to Me too

    • @gamer-revolution
      @gamer-revolution 3 ปีที่แล้ว

      Coz ist fake

    • @adhviklalthoppe2214
      @adhviklalthoppe2214 3 ปีที่แล้ว

      This is very late but the way to fix this (i think) is to
      1.) Go to the top left
      2.) Click on file
      3.) Click on build settings
      4.) Drag and drop all your scenes into the big space (make sure you drag them into the order you want people to see it in)

  • @kizune3322
    @kizune3322 3 ปีที่แล้ว +1

    i love your videos

  • @Romope
    @Romope 3 ปีที่แล้ว

    Hi, thanks for the video!
    To stop receiving inputs for the gamepad(it's moving the character even when paused) e still making it available to navigate the menu, how do I achieve that?

  • @firizz
    @firizz ปีที่แล้ว

    Very helpful! thanks

  • @franciscospinola7883
    @franciscospinola7883 2 ปีที่แล้ว

    Ty so much, you helped me a lot!!

  • @ThescreamingRooster
    @ThescreamingRooster 2 ปีที่แล้ว

    i got the menu button and quit button to work but i cant resume the game or push escape to take the menu away

  • @silver8349
    @silver8349 4 ปีที่แล้ว

    Hello, I followed the tutorial and I like it! but it seems there is a problem happening to me, when I pause the game my Standard FPS controller still rotating any advise?

  • @sametceylan4445
    @sametceylan4445 3 ปีที่แล้ว

    Guys, please be careful about that method called GoToMainMenu(). Cause if you forget to add that "Time.timeScale = 1" line, your game is freezing and just buttons working. No animation or anything else...

  • @naruto40kiba30
    @naruto40kiba30 2 ปีที่แล้ว

    Hmm I'm pressing the button but the menu does not come up. I already added the gameobject to the script as well. Can anyone help?

  • @SOS_Studios
    @SOS_Studios 4 หลายเดือนก่อน +1

    can you put the script in comments/description?

  • @HistoryOnPaper
    @HistoryOnPaper ปีที่แล้ว +2

    Assets/scripts/PauseMenu.cs(50,43): error CS1002: ; expected
    if you get this error it’s a typo and you got carried away typing all that code and forgot to put a single ; at the end of your line.

    • @whysl
      @whysl ปีที่แล้ว

      just put the ";" symbol in 50 line

    • @HistoryOnPaper
      @HistoryOnPaper ปีที่แล้ว +1

      @@whysl oh was this comment still here I forgot to delete I solved this problem 7 days ago but I’m still gonna leave it here just if anyone is an idiot like me and makes any typos.

  • @jaymhlurbaloyi7813
    @jaymhlurbaloyi7813 3 ปีที่แล้ว

    unity gives me an error saying " PauseMenue does not have a definition for SetActive" on top of that the public gameObject does not appear in the scripts inspector. Can anyone help?

  • @BossAleks123
    @BossAleks123 2 ปีที่แล้ว

    Great video thx : )

  • @ojaskalra4863
    @ojaskalra4863 ปีที่แล้ว

    For some reason my buttons aren't working at all, can't click or hover on them. Any possible causes?

  • @hiltop5190
    @hiltop5190 3 ปีที่แล้ว

    Thanks that's help me a lot

  • @dartpi1436
    @dartpi1436 ปีที่แล้ว

    I don't have anything like GameManager... What gameObject should I put into "On click" event instead?

    • @FNAFgorilla
      @FNAFgorilla ปีที่แล้ว

      canvas

    • @FNAFgorilla
      @FNAFgorilla ปีที่แล้ว

      you put the scirpt in the canvas

  • @lohaxx
    @lohaxx 2 ปีที่แล้ว

    I dont know where you put the script, becasue you said it doesnt matter where the script lives but it clearly does as its not working for me

    • @BMoDev
      @BMoDev  2 ปีที่แล้ว

      What kind of error you getting? Whys it not working?

  • @mrlbrvista
    @mrlbrvista 3 ปีที่แล้ว

    my main menu is stuck for some reason after going from the pause menu, what could be the problem ?
    i hope someone answers asap really need it for school

  • @andy95summer
    @andy95summer 4 ปีที่แล้ว

    UnassignedReferenceException: The variable pauseMenu of PauseMenu has not been assigned.
    You probably need to assign the pauseMenu variable of the PauseMenu script in the inspector.
    PauseMenu.Start () (at Assets/Scripts/PauseMenu.cs:14)
    PauseMenu.ResumeGame() (at Assets/Scripts/PauseMenu.cs:42)
    what I miss or did wrong?

    • @radhix1
      @radhix1 3 ปีที่แล้ว +1

      I have the same problem and I can't figure it out

    • @blaveofficial1796
      @blaveofficial1796 2 ปีที่แล้ว +1

      Same here

    • @TBag-xl9qz
      @TBag-xl9qz ปีที่แล้ว +1

      Same

  • @hamzaodt3515
    @hamzaodt3515 4 ปีที่แล้ว +1

    is this working with touches ??
    i want to make it for my android mobile game?

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว +1

      A "touch" registers as a mouse click. It can easily work with Mobile. Instead of pressing the Escape key you'd need some sort of Pause button on the screen

    • @hamzaodt3515
      @hamzaodt3515 4 ปีที่แล้ว +1

      @@BMoDev a pause button connected with the menu , thanks

  • @avalanche9223
    @avalanche9223 3 ปีที่แล้ว

    i don't have a PauseMenu function. can someone explain why? thanks in advance.

  • @morarogames
    @morarogames ปีที่แล้ว

    bro how to off al sounds when the game is pused

  • @GLITCHYSKY228
    @GLITCHYSKY228 ปีที่แล้ว +3

    Great tutorial, but this doesn't work with unity's new input system.

    • @baron_shiro9877
      @baron_shiro9877 ปีที่แล้ว

      I'm dealing with the same issue right now.

    • @baron_shiro9877
      @baron_shiro9877 ปีที่แล้ว

      I've found the solution though!
      Go to Edit -> Project Settings->Player->Under Other Settings under Configuration is the option Active Input Handling. Select Both.
      Hope this helped!

    • @GLITCHYSKY228
      @GLITCHYSKY228 ปีที่แล้ว

      @@baron_shiro9877 It does, thanks, but I think I might stick with the old input system as there are more supported assets/scripts for it

    • @GLITCHYSKY228
      @GLITCHYSKY228 ปีที่แล้ว

      @@baron_shiro9877 Thank you!

  • @joaocarlosp.p.6550
    @joaocarlosp.p.6550 ปีที่แล้ว

    Time.timeScale, affects button animations, how to avoid it?

  • @Tirre200
    @Tirre200 10 หลายเดือนก่อน +2

    when i try to click a button my cursor disables and goes into the game

    • @a26lolhart
      @a26lolhart หลายเดือนก่อน +1

      Your game locks your mouse so you have to make it unlock when it's paused and relock when resumed

    • @Tirre200
      @Tirre200 หลายเดือนก่อน

      @@a26lolhart thanks for replying 8 months later

  • @thegreatside6059
    @thegreatside6059 4 ปีที่แล้ว

    when i press play the game goes on but when i press the esc button it will not show up. can someone help me?

  • @MaZyYTube
    @MaZyYTube 4 ปีที่แล้ว

    What if you have animations and want to use them? Example you have options button and want to make it slide in the option screen if you click on it.

    • @FOLDIK_UA
      @FOLDIK_UA 10 หลายเดือนก่อน +1

      sail to Ukraine🙂

  • @LeHalazoone
    @LeHalazoone 3 ปีที่แล้ว

    I HAVE A PROBLEM
    Escape button do not work and i checked in the setting in the Input Manager to affect the name in the code as the name of the button in the settings...
    PLEASE HELP

    • @shyanneautumn3461
      @shyanneautumn3461 3 ปีที่แล้ว

      unity has a defult setting that makes the escape key allow you to move your mouse outisde the game viewer to exit play mode, i set it to Q for me for testing purposes

    • @bluecrazyclown._.9865
      @bluecrazyclown._.9865 ปีที่แล้ว

      I would change it to “…GetKeyDown(KeyCode.P)) “
      For it to work as when playing a game you don’t really want to press “esc” as takes away from immersion

  • @raymonddarmari2632
    @raymonddarmari2632 ปีที่แล้ว

    This is perfect but when I pause the game, I can still move my character even when paused and in pause menu. How to prevent this?

    • @SOFCsquad
      @SOFCsquad ปีที่แล้ว

      look into pausing time in unity

  • @thomascircle245
    @thomascircle245 ปีที่แล้ว

    Time.timeScale doesn't seem to work on my Unity.
    Edit: For that matter, neither does triggering the paused bool.

    • @d4zed_
      @d4zed_ ปีที่แล้ว

      try looking through the package manager sry if im to late

  • @__-dc1no
    @__-dc1no 4 ปีที่แล้ว

    i'm with the following error
    Assets\scripts\PauseMenu.cs(45,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

    • @BMoDev
      @BMoDev  4 ปีที่แล้ว

      That's a syntax error. Please share your code, we have a channel in our discord to help with these issues! (Should be a quick fix)

  • @frong22
    @frong22 ปีที่แล้ว

    thanks you guy

  • @emanmane
    @emanmane 4 ปีที่แล้ว

    How can I make the escape button android friendly?

  • @thecrew2079
    @thecrew2079 ปีที่แล้ว

    finished the PauseMenu script. error The Name 'PauseGame' does not exist in the current context. pls help?!

    • @reidmossel
      @reidmossel ปีที่แล้ว

      Check to see if your PauseGame() function has a typo

  • @kirsteinwandah
    @kirsteinwandah 3 ปีที่แล้ว

    What vs code extensions do u use for unity