Make a Confirmation window in Unity in 6 minutes! [Tutorial]

Sdílet
Vložit
  • čas přidán 13. 09. 2024
  • Make a confirmation window in Unity
    Be sure to check out my Unity for Complete Beginners course on Udemy here: www.udemy.com/...
    Welcome to MetalStorm Games where you will learn how to make 2D and 3D games using the Unity Game Engine. My channel has a focus on Game Development for the beginner to intermediate level of programmer and game creator using C#. Please click the subscribe button if you would like to follow for more game development guides and tutorials, there will be complete beginner series and courses coming in the near future.
    In this video we make a Confirmation or Notification window in Unity that is modular for multiple uses in 6 minutes. We will add Listeners via code to the menu so that you can change what each button does without needing the editor window.
    After the tutorial I explain a few more advanced uses you can add in to this to make it much more modular in the future.
    Free UI assets from Kenney at : www.kenney.nl/...
    Discord Server
    / discord
    Twitter
    / metalstormgames
    #Unity​ #GameDev #Tutorial

Komentáře • 27

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

    The explanation was so so good and simple. Thanks.

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

      Glad to hear that it was easy to follow. I am still learning a lot on how to explain these concepts so I appreciate hearing it helped out.

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

    Great tutorial on listeners and pop-up, thanks for the learning opportunity.

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

    Great explanation, straight to the point. Good work!

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

    Awesome and helpful tutorial!

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

    Thanks, Great tutorial! Ready for a follow up version that uses delegates, statics and/or singleton pattern.

    • @MetalStormGames
      @MetalStormGames  Před 2 lety

      Thanks, I do need to make a better one soon that is more event driven.

  • @TheMehranKhan
    @TheMehranKhan Před rokem +1

    you're doing great man keep it up! deserve more subs def

    • @MetalStormGames
      @MetalStormGames  Před rokem +1

      Thanks I really appreciate it and thanks for watching

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

    Great tutorial, should be helpful in making just about any type of game! I think I prefer this style, because it can be expanded on in future videos if the content calls for it.

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

    Fast and simple, I like it.

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

    One thing I forgot to cover in the video is that when you are done with the confirmation window you will want to remove the listener from each button so that if you call it again from another script it will not run the methods in both scripts (unless that is what you want it to do). You remove a listener with the code "onClick.RemoveListener".
    Please leave any comments below about which method of tutorials you prefer, ones that are a bit longer and explain things in more detail or quick and to the point like in this one. Thanks for watching.

    • @RAY-vd9ep
      @RAY-vd9ep Před 2 lety

      How can i get which button is clicked from another script?

    • @MetalStormGames
      @MetalStormGames  Před 2 lety

      @@RAY-vd9ep That one gets a bit trickier when starting but you may want to do a search on Events and you could use an event that gets triggered when the button is pressed.

    • @MetalStormGames
      @MetalStormGames  Před 2 lety

      @@RAY-vd9ep Its not the best but you could also do something like just make some public bool values on a script that handles the buttons and set the bools to be true for whichever button is clicked. Then you could get a reference to that script from the other one you wanted to check it from. Not a very clean option but it would work fine as well.

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

    Good stuff!

    • @MetalStormGames
      @MetalStormGames  Před 3 lety

      Thanks, looking forward to seeing what you post in the future as well.

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

    I think it's not so good example... It's hard to use. A much better way is to use delegates. In this case, any object can show any confirmation and use it in a way that is needed.

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

      Thanks for the feedback, I agree completely I was just trying to keep this one simple for beginners but I think I might make another video showing a bit more you can do with it by extending it.

  • @cedrickgacer1031
    @cedrickgacer1031 Před 2 lety

    ConfirmationWindow is erroring. Why?

    • @MetalStormGames
      @MetalStormGames  Před 2 lety

      Will need more details, what point are you having a problem with? the error message will usually describe what the issue is in the message. Provide the error message details and can try to help out troubleshooting. You may want to rewatch the video as well just to make sure you didnt miss something. Majority of the time its a small step that gets missed.

  • @Izzy-fr1zu
    @Izzy-fr1zu Před 10 měsíci +1

    Sorry but I don't think this is a very clean solution. It's not reuseable at all, would be much better to be able to re-use one confirmation-window in different scenarious and trigger different methods without the need to implement the whole system again...

    • @MetalStormGames
      @MetalStormGames  Před 9 měsíci

      You are definitely correct in that, this was aimed at very beginner level and to not be confusing or complex but the downside to that is that it is not very modular.