How to make a menu in Unity - UI Tutorial

Поділитися
Вставка
  • Опубліковано 6 лип 2024
  • Your user interface will be the first thing your players interact with when entering your game. Ensure your UI is reliable across different resolutions and aspect ratios.
    Better yet, make the menu FUN to navigate, instead of just a required element in your game.
    !! Somebody pointed out UI buttons actually have a "Sprite Swap" feature !!
    Subscribe if you learned something ;)
    Video assets: bit.ly/3n2v18M
    ❤️ Become a Tarobro on Patreon: / tarodev
    =========
    🔔 SUBSCRIBE: bit.ly/3eqG1Z6
    🗨️ DISCORD: / discord
    ✅ MORE TUTORIALS: / tarodev
    00:00 Intro & scene setup
    00:30 Creating your first UI element
    01:20 The Rect tool
    01:45 Anchoring elements into position
    03:35 Filling the screen with an image
    04:15 Adding images to the UI
    05:20 Expanding images without stretching
    07:15 Adding text using TextMeshPro
    08:40 Custom fonts in Unity
    09:50 Styling the text
    10:25 Adding buttons the menu
    11:30 Scaling the canvas with screen size
    12:20 Adding click events to Unity UI using IPointerDownHandler
    15:00 Scrolling background using Raw Image
    16:40 Ordering UI elements
    17:30 Animated side menu
    21:40 Animation state machine
    24:43 Adding anchored decorations

КОМЕНТАРІ • 191

  • @windup247
    @windup247 2 роки тому +38

    Just 5 minutes in, and this is the best explanation of Unity UI I've ever seen. You have a unique talent for explaining complex topics. Thank you for making this!

    • @windup247
      @windup247 2 роки тому +6

      Finished the tutorial--it's even better than I initially thought. Clear explanations, great examples. Your tutorials really bridge this gap between beginner and expert levels that is sorely missing out there!

    • @Tarodev
      @Tarodev  2 роки тому +6

      @@windup247 such lovely feedback. Thanks Mars

    • @toninotonnato7776
      @toninotonnato7776 10 місяців тому

      @@windup247 Absolutely, Unity's tutorial should be all like that!

  • @jumpingman6612
    @jumpingman6612 2 роки тому +34

    Man.. Just spent a week trying to make a UI for a game project.
    Never launched Unity or used code before. I HATE YT algorithm for not showing me this.
    Hands down the most informative and easy to follow along to. Thanks!!

  • @halivudestevez2
    @halivudestevez2 Рік тому +1

    This step by step video reflects and answers upcoming obstacles and questions while building UI. Very well structured!

  • @verbatim7488
    @verbatim7488 Рік тому +1

    I knew looking through my subscriptions for UI tutorials was a good idea. I appreciate it mr tarodev, this seems like a good starting point.

  • @narkopraxis602
    @narkopraxis602 2 роки тому +17

    Best tutorial ever! I ignored my kids to watch this video on my phone knowing full well I'd just need to watch it again later when I actually sit down to follow it.
    Don't worry, I bribed my kids with pancakes first. Cleaning up a syrup mess is an easy price to pay if I get to watch more juicy Tarodev content 😂

  • @Briglair
    @Briglair Рік тому +7

    Great UI tutorial! Covers all of the basics you need to get started, and you do so quickly without any overdrawn explanations that become boring and unnecessary. Straight and to the point.

    • @Tarodev
      @Tarodev  Рік тому

      Glad you enjoyed it boog

  • @mufaddalrasheed3319
    @mufaddalrasheed3319 2 роки тому +6

    Thank you man so much, you really help all the early generation of coders. Once again, Thank You!

  • @someonesomewhere1975
    @someonesomewhere1975 Рік тому +1

    Awesome tuturial - all needed cases are explained in a nice and understandable manner. Nice work thanks!

  • @DmytroSkorobohatskyi
    @DmytroSkorobohatskyi 2 роки тому

    The best tutorial about UI creation in Unity i've ever seen. You are amazing)

  • @DiegoCastares
    @DiegoCastares 2 роки тому +1

    Nice way to explain things mate. Keep up the good work!

  • @sofialpaca2563
    @sofialpaca2563 2 роки тому +4

    I have an assignment due in about a week, and your tuts are absolute lifesavers, thanks ❤️

    • @Tarodev
      @Tarodev  2 роки тому +1

      Get good marks!!

  • @raxacoricofallapatorius8484
    @raxacoricofallapatorius8484 3 місяці тому

    so far, the absolute best vid on Unity UI I have seen.

  • @thatrandomgamedeveloper8979
    @thatrandomgamedeveloper8979 2 роки тому +7

    I'm a very detail oriented person, and I mean very. I absolutely love your explanation on absolutely everything that's going on, love your videos. Definitely inspires me to get back into Unity again lol

    • @Tarodev
      @Tarodev  2 роки тому +4

      You're watching this while you're not even in a unity phase? Dedication 😂

  • @anlozge1788
    @anlozge1788 Рік тому +1

    I was screaming when I see the -1 speed animation. Great tutorial, I literally feel immortal!

    • @Tarodev
      @Tarodev  Рік тому

      God powers unlocked

  • @timodev
    @timodev 2 роки тому +1

    Great video, good explanations and easy to follow!

  • @Sof_Hill
    @Sof_Hill 2 роки тому

    Super useful tutorial on UI aspect. Thanks!

  • @felixconrad9248
    @felixconrad9248 2 роки тому

    This Tutorial Really Helped my at understanding UI(alt least n the surface Level)
    and i didnt need to check everything 80 times to get it like yours -> it was very easy to follow

  • @LayneHarris
    @LayneHarris 2 роки тому

    I learned so many helpful things in this video. Thank you so much!

  • @abdullah4653
    @abdullah4653 2 дні тому

    awesome tutorial and info thanks man👍

  • @vuanh4084
    @vuanh4084 2 роки тому +2

    You nailed it! Your instructions is very clear and easy to understand.
    I'm a Unity beginner and your tutorial make me feel confident with it.
    Thank you very very much.

    • @Tarodev
      @Tarodev  2 роки тому

      Glad it helped!

  • @rickloyd8208
    @rickloyd8208 2 місяці тому

    Thank you so much for your awesome video! I like your concept of splitting animation and logic into own components. I tried today in actual project and I like it very much! It also makes animations reusable!!!

  • @neopickaze
    @neopickaze 2 роки тому +1

    Finally a great Unity UI tutorial!

  • @absolutewisp
    @absolutewisp 2 роки тому +5

    Around 9:10
    Quick tip: You can create the font asset quickly with the Ctrl-Shift-F12 keybind.

  • @castlecodersltd
    @castlecodersltd 4 місяці тому

    Great explanation, thank you 🙂

  • @luenciso8789
    @luenciso8789 Рік тому +1

    Amazing video, don't understand why it take me sooo long to find it!!

  • @Andropex
    @Andropex 2 роки тому +1

    Simple as that.
    Thanks for cool lesson!
    Keep going.

  • @alexgeeves7096
    @alexgeeves7096 Рік тому

    You never miss! You're getting a shout out when/if I ever release anything

  • @user-pd2ne5vu5f
    @user-pd2ne5vu5f Місяць тому

    thank you for this useful tutorial!

  • @DaniloMatos13
    @DaniloMatos13 2 роки тому +1

    Dude, you channel need to be bigger!!! Congrats and keep up the Job good Sir! (just subscribed to your channel - Thank You for the content)

    • @Tarodev
      @Tarodev  2 роки тому

      Thanks mate ❤️

  • @WhoForgot2Flush
    @WhoForgot2Flush Рік тому

    Great tutorial for UI basics, thanks.

  • @andreyromanko4194
    @andreyromanko4194 2 роки тому

    Thanks, man. Very cool tutorial.

  • @ElboxD
    @ElboxD 2 роки тому

    Awesome as always. Thanks, mate!

  • @MartinMcDermot
    @MartinMcDermot Рік тому +1

    OMG... this tutorial is incredible!!!

  • @DenViPhech
    @DenViPhech 10 місяців тому +1

    Thank you so much, the great tutorial video

  • @noyshulman4515
    @noyshulman4515 4 місяці тому

    Very helpful! Thanks!!

  • @asdrofllmao
    @asdrofllmao Рік тому

    Exceptional tutorial, thank you.

  • @UsMan-nv2uh
    @UsMan-nv2uh Рік тому

    best tutorial ,subscribed!

  • @oyaguni961
    @oyaguni961 2 роки тому +1

    Thank you for the video and for your time!

  • @KyryloVesna
    @KyryloVesna 2 роки тому +1

    Very good tutorial, very informative

  • @omritahar9048
    @omritahar9048 2 роки тому +1

    Wonderful tutorial my friend. Going to binge your channel soon :)

    • @Tarodev
      @Tarodev  2 роки тому +1

      Thanks Omri 😊

  • @rambertoeco8930
    @rambertoeco8930 2 роки тому

    Awesome tutorial, thanks!

  • @notDiru
    @notDiru 2 роки тому +1

    That's what exactly what I need , Thanks!

  • @LukeTramps
    @LukeTramps 2 роки тому

    Now, this makes all the other Unity UI tuts look like crap.
    Excellent work! Hope your channel keeps growing.

  • @fauzanshaikh2170
    @fauzanshaikh2170 Рік тому

    Its jumbo tutorial, learned lots of thing with one go, thanks a lot

  • @abdoulraoufgambo
    @abdoulraoufgambo Рік тому

    ohh !! i like watching your videos because your solutions are good and the code is clean

  • @janira98
    @janira98 Рік тому

    Oh maannnnn! This is the Unity UI abosolute beginer tutorial.💯👌 You are grate keep it up your good work! 👌✌

  • @andrewallbright658
    @andrewallbright658 Рік тому +3

    I'm so glad UI toolkit exists now. Making UI like this feels like smashing rocks together. Using a web dev like experience for UI is so much better.

  • @beavisCZ
    @beavisCZ 2 роки тому +54

    Hi, this is great tutorial on UI. Please continue in more complex UI controls like sliders, option boxes, etc.

    • @smokinglife8980
      @smokinglife8980 2 роки тому +10

      I'm not trying to be rude bud but you won't learn much just watching videos try the stuff yourself so you wanted sliders and stuff just add them the same way you did other ui shit they just look at the configuration then put it to your liking

    • @Vanduo610
      @Vanduo610 Рік тому

      ​@@smokinglife8980Literally he will learn. How can you learn if not watching how to do it? I am building android game and my UI is streching and it ruins my UI. Now, after this video, I knoč how to stop UI from streching.

    • @Smokey-A
      @Smokey-A 11 місяців тому +4

      ​@@Vanduo610if you rely on tutorials for every part of your game you will not learn. You need to use the tutorials to learn how things work and then implement specifics yourself

  • @abhishekshrestha6394
    @abhishekshrestha6394 2 роки тому +1

    You deserve more subs man

  • @Egorka413
    @Egorka413 2 роки тому

    Seen quite a few of your videos, thank you for your content. I find it more ejoyable and useful compared even to bigger Unity youtubers. As guy below said, you have a talent!

    • @Tarodev
      @Tarodev  2 роки тому +1

      Appreciate it mate ❤❤ Good luck on your gamedev journey!

  • @NIKOSPARAPONIARIS
    @NIKOSPARAPONIARIS 2 роки тому +1

    Great Tutorial! Thanx again!

  • @sgtghost17
    @sgtghost17 Рік тому

    Outstanding videos, thank you

  • @KRISZABTUTOS
    @KRISZABTUTOS 2 роки тому +2

    Excelent tutorial!

  • @muhammadrizkyramadhan6456
    @muhammadrizkyramadhan6456 Рік тому +1

    I nearly give up until i found this video , you are my life saver

  • @PakuBaku
    @PakuBaku 2 роки тому +1

    Very helpful

  • @lokepuisan2456
    @lokepuisan2456 Рік тому

    Great UI Tutorial!

  • @abrahambrookes1927
    @abrahambrookes1927 Рік тому

    Epic tutorial thank you very much, your whole library is top notch. I'd love to get a run through on the unity profiler and what it all means, and the unity testing framework and how to use it in development.

  • @caglayangursugokbulut9664
    @caglayangursugokbulut9664 2 роки тому

    what a great tutorial. thanks !

  • @MoOdaso
    @MoOdaso 2 роки тому

    Great tutorial..good work .

  • @insansever738
    @insansever738 2 роки тому

    Perfect, need more.

  • @mcgyverbasaya6748
    @mcgyverbasaya6748 11 місяців тому

    I like how he explain everything.

  • @user-qz9lo5yc9f
    @user-qz9lo5yc9f 2 місяці тому

    thanks sir, you're the best

  • @elyziefrancis
    @elyziefrancis Рік тому

    Thank you, THANK YOUUUU SO MUCH for your tutorial video Mr.✨✨It's really reallllly help me to do my project, keep on doing the great work✨✨I appreciate your video and I really mean it🥹✨✨✨

  • @brsdncr
    @brsdncr 2 роки тому

    Very helpful as always! :)

  • @hattoriwakarannode
    @hattoriwakarannode Рік тому

    Great tutorial !

  • @rohithathrangadan9614
    @rohithathrangadan9614 Рік тому

    Much appreciated tutorial .
    I'm interested in knowing how to make the logo like that. Thank you

  • @ioanabiris3472
    @ioanabiris3472 Рік тому

    Thank you!

  • @rynngrey3722
    @rynngrey3722 Рік тому +1

    Note: If your sprites are not transferring over to the "None (Sprite)" box, be sure to highlight all sprites, hit Sprite (2D and UI), and underneath it, and click SINGLE in the "Sprite Mode" box. Your sprites in the Asset/Scene window should display a small play button on them.

  • @fagnersales532
    @fagnersales532 2 роки тому +1

    Your video helped me a lot (i got kinda crazy because of the volume of every audio you played lmao)

    • @Tarodev
      @Tarodev  2 роки тому

      Sorry about that >

  • @perrygretton474
    @perrygretton474 Рік тому

    Excellent tutorial for beginners.

    • @Tarodev
      @Tarodev  Рік тому

      Glad it was helpful!

  • @aaronsamuels863
    @aaronsamuels863 Рік тому +1

    thx soo much!

  • @KG-id3hk
    @KG-id3hk 9 місяців тому +2

    I literally have almost all of your videos in a playlist called "Best Unity Information" might as well just put your entire channel in that playlist

    • @Tarodev
      @Tarodev  9 місяців тому +1

      Glad to be in your playlist

  • @makra42069
    @makra42069 11 місяців тому

    Thanks for this!

  • @leszoms
    @leszoms 2 роки тому

    thanks for the video !

  • @user-zw4in2sj9p
    @user-zw4in2sj9p 9 місяців тому

    awsome , nice , ty

  • @toninotonnato7776
    @toninotonnato7776 10 місяців тому +1

    Great tutorial, I really enjoyed it. You have a perfect pace, explain things clearly and make simple examples easy to reproduce. First time I use the animation panel and loved the result. Thanks a lot.

    • @Tarodev
      @Tarodev  10 місяців тому

      Awesome 😊 glad I could help

  • @Nullscr1pt
    @Nullscr1pt Рік тому +1

    Set Trigger (String) also triggers a boolean with that same name. and ResetTrigger(String) undoes the boolean.

  • @dnm.design
    @dnm.design 2 роки тому

    thanks you explain very very nice! Sadly I want to see a second video were you show how to trigger the first level of a game, how to disabled a button or (probably more difficult) change the language of the text. But again amazing video! thanks for sharing

  • @malikmuhammadarslan9993
    @malikmuhammadarslan9993 Рік тому

    thanks buddy

  • @giovanemachado8339
    @giovanemachado8339 2 роки тому +1

    great! thanks

  • @CCV334
    @CCV334 2 роки тому

    Do you have any tips for animating UI based on an Audio file? How would you preview audio live while animating UI via the animator?

  • @FelixGB_
    @FelixGB_ 11 місяців тому

    Crazy awsome!
    Started Unity 2-3 weeks ago and I love this kind of tutorial.
    Out of curiosity, if I may, for these 2 settings icons (sound /vibration), if I get this right, would the sound/vibrate update a GameState so all scenes knows what to do?

  • @jiaqiwu3792
    @jiaqiwu3792 Рік тому

    Thank you for your video! I love your videos because you sound like "meow" when you say "now", very cute.

  • @warampanpengya8748
    @warampanpengya8748 2 роки тому +1

    Hi This is very helpful tutorial !!!
    I am though stuck at the animator with the trigger state. Once I am in the Game mode and press play, the animation only run and stop within the Start, not transitioning to Show settings and so on, wondering if there's anything I miss from the tutorial. I made sure I followed each step, I even deleted and tried again, it's still stuck. The button works but the animation is not playing :(

  • @sterling709
    @sterling709 2 роки тому

    thank you

  • @ardaozler631
    @ardaozler631 2 роки тому +2

    Thank you! I love your tutorials. Can you make a video about Managers generally and how to use them together? Like using game manager/sound manager/menu manager/ npc manager on the same project.

    • @Tarodev
      @Tarodev  2 роки тому +2

      That's a good idea 💡 they're a vital aspect of game dev. I'll add it to the list

    • @ardaozler631
      @ardaozler631 2 роки тому +1

      @@Tarodev Thank you! I look forward to watching them!

    • @RealisiticEdgeMod
      @RealisiticEdgeMod 2 роки тому

      @@Tarodev 22:20 Thats not how 'parameters' is pronounced.

  • @marcdirian6370
    @marcdirian6370 2 роки тому +1

    Hi, love your mindset when u explain unity tutorials. But... could u make a simple projet tutorial with new ui toolkit ? Would sound GREAT !!!
    Malcom from PARIS

  • @captainnoyaux
    @captainnoyaux 2 роки тому +2

    It's marvelous ! Did you cover UI toolkit for similar needs ?

    • @Tarodev
      @Tarodev  2 роки тому +1

      I have not dived into UI Toolkit yet, but plan to soon!

  • @yusufum_
    @yusufum_ 7 місяців тому

    awesome

  • @MrFaciio
    @MrFaciio Рік тому +1

    Which way is better? Animate UI via Animator or with scripts (for example LeanTween/DoTween)?

  • @josemonkey
    @josemonkey Рік тому +1

    Great video! Possibly dumb question: Is there any reason why I couldn't build this sort of UI for a 3D game, or will this only work in a 2D game?

    • @Tarodev
      @Tarodev  Рік тому +1

      It'll work just fine for 3D :)

  • @cast1594
    @cast1594 2 роки тому +1

    The IWasClicked() function does not show up in my dropdown for some reason, and I have followed other tutorials and have had the same problem. I'm currently using 2020.3.14f1, is it as simple as updating or is there something that I am missing that I am unaware of?

  • @subirin96
    @subirin96 7 місяців тому +1

    Love your videos man. I have a question, is it okay to leave a SerializeField without reference? I made many buttons in my menu system, some having audio on click, others on release and some have audio on both click & release. When playing, there are no issues but will it cause problem down the line? Or should I just drag empty audio file as reference?

    • @Tarodev
      @Tarodev  7 місяців тому +1

      It won't cause any problems at all 😊
      Edit: I'm not at my pc, but I believe trying to play an null audio clip produces a warning, but not an error. Could be wrong

    • @subirin96
      @subirin96 7 місяців тому

      @@TarodevThanks for the reassurance. It does produce a warning and that is the reason I came here for answer.

  • @maxfun6797
    @maxfun6797 2 роки тому +1

    Ure so cool bro. Thanks 🫂

  • @wewillovercome5834
    @wewillovercome5834 11 місяців тому

    i really wish you could make the text your typing on the screen a bit bigger because while your lesson sounds pretty good, i can not read the stuff your typing

  • @basslinejunkies9976
    @basslinejunkies9976 2 роки тому

    what extensions are you using in unity vidual studio for c#?????

  • @XZYSquare
    @XZYSquare 2 роки тому

    Why use Ipointerdownhandler instead of unity's default button script? I feel like i won't be able to navigate this UI using my controller based on how its not a pointer... What will this do if i'm on the new unity input system?

    • @trashcaster
      @trashcaster 2 роки тому

      Most likely won't function since the Event Manager used for default canvas inputs is a different than the New Input System Event Manager. The interface might not be called, depending on if Unity calls back to the legacy interfaces or not. You would have to experiment to find out.

  • @evanlin7656
    @evanlin7656 2 роки тому

    how can you get the EventSystems pop in the code line.

  • @kkun1240
    @kkun1240 10 місяців тому

    on 13:10 my vs code not even show error do I need to download something first or I miss something??

  • @wewillovercome5834
    @wewillovercome5834 11 місяців тому

    the issue i am having is i have created buttons and linked them to a script and created my event method and a debug console log to trigger and check to see if my event is working, but my problem is i cannot get my buttons to show up in the game mode view or in the avtual game itself and i am so frustrated why is this sooooo difficult???