How to make a menu in Unity - UI Tutorial

Поделиться
HTML-код
  • Опубликовано: 26 июн 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

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

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

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

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

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

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

  • @verbatim7488
    @verbatim7488 11 месяцев назад +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.

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

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

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

  • @neopickaze
    @neopickaze 2 года назад +1

    Finally a great Unity UI tutorial!

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

  • @DiegoCastares
    @DiegoCastares 2 года назад +1

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

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

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

  • @vuanh4084
    @vuanh4084 Год назад +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.

  • @Sof_Hill
    @Sof_Hill 2 года назад

    Super useful tutorial on UI aspect. Thanks!

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

  • @timodev
    @timodev 2 года назад +1

    Great video, good explanations and easy to follow!

  • @LayneHarris
    @LayneHarris 2 года назад

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

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

  • @alexgeeves7096
    @alexgeeves7096 Год назад

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

  • @ElboxD
    @ElboxD 2 года назад

    Awesome as always. Thanks, mate!

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

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

    • @Tarodev
      @Tarodev  Год назад

      God powers unlocked

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

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

  • @absolutewisp
    @absolutewisp Год назад +5

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

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

    OMG... this tutorial is incredible!!!

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

    Great explanation, thank you 🙂

  • @user-pd2ne5vu5f
    @user-pd2ne5vu5f Месяц назад

    thank you for this useful tutorial!

  • @Andropex
    @Andropex 2 года назад +1

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

  • @asdrofllmao
    @asdrofllmao Год назад

    Exceptional tutorial, thank you.

  • @UsMan-nv2uh
    @UsMan-nv2uh Год назад

    best tutorial ,subscribed!

  • @WhoForgot2Flush
    @WhoForgot2Flush Год назад

    Great tutorial for UI basics, thanks.

  • @notDiru
    @notDiru 2 года назад +1

    That's what exactly what I need , Thanks!

  • @andreyromanko4194
    @andreyromanko4194 Год назад

    Thanks, man. Very cool 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 ❤️

  • @oyaguni961
    @oyaguni961 2 года назад +1

    Thank you for the video and for your time!

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

    Very helpful! Thanks!!

  • @KyryloVesna
    @KyryloVesna 2 года назад +1

    Very good tutorial, very informative

  • @rambertoeco8930
    @rambertoeco8930 2 года назад

    Awesome tutorial, thanks!

  • @abhishekshrestha6394
    @abhishekshrestha6394 2 года назад +1

    You deserve more subs man

  • @lokepuisan2456
    @lokepuisan2456 Год назад

    Great UI Tutorial!

  • @KRISZABTUTOS
    @KRISZABTUTOS 2 года назад +2

    Excelent tutorial!

  • @DenViPhech
    @DenViPhech 9 месяцев назад +1

    Thank you so much, the great tutorial video

  • @insansever738
    @insansever738 2 года назад

    Perfect, need more.

  • @fauzanshaikh2170
    @fauzanshaikh2170 Год назад

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

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

  • @omritahar9048
    @omritahar9048 2 года назад +1

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

    • @Tarodev
      @Tarodev  2 года назад +1

      Thanks Omri 😊

  • @caglayangursugokbulut9664
    @caglayangursugokbulut9664 2 года назад

    what a great tutorial. thanks !

  • @janira98
    @janira98 Год назад

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

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

  • @NIKOSPARAPONIARIS
    @NIKOSPARAPONIARIS 2 года назад +1

    Great Tutorial! Thanx again!

  • @abdoulraoufgambo
    @abdoulraoufgambo Год назад

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

  • @sgtghost17
    @sgtghost17 Год назад

    Outstanding videos, thank you

  • @MoOdaso
    @MoOdaso 2 года назад

    Great tutorial..good work .

  • @LukeTramps
    @LukeTramps 2 года назад

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

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

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

  • @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 11 месяцев назад

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

  • @PakuBaku
    @PakuBaku 2 года назад +1

    Very helpful

  • @hattoriwakarannode
    @hattoriwakarannode Год назад

    Great tutorial !

  • @brsdncr
    @brsdncr 2 года назад

    Very helpful as always! :)

    • @Tarodev
      @Tarodev  2 года назад

      Thanks baris!

  • @user-qz9lo5yc9f
    @user-qz9lo5yc9f 2 месяца назад

    thanks sir, you're the best

  • @mcgyverbasaya6748
    @mcgyverbasaya6748 11 месяцев назад

    I like how he explain everything.

  • @ioanabiris3472
    @ioanabiris3472 Год назад

    Thank you!

  • @perrygretton474
    @perrygretton474 Год назад

    Excellent tutorial for beginners.

    • @Tarodev
      @Tarodev  Год назад

      Glad it was helpful!

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

    Thanks for this!

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

  • @leszoms
    @leszoms 2 года назад

    thanks for the video !

  • @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🥹✨✨✨

  • @rohithathrangadan9614
    @rohithathrangadan9614 Год назад

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

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

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

    thx soo much!

  • @user-zw4in2sj9p
    @user-zw4in2sj9p 9 месяцев назад

    awsome , nice , ty

  • @rynngrey3722
    @rynngrey3722 11 месяцев назад +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.

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

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

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

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

    thanks buddy

  • @giovanemachado8339
    @giovanemachado8339 2 года назад +1

    great! thanks

  • @jiaqiwu3792
    @jiaqiwu3792 Год назад

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

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

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

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

  • @yusufum_
    @yusufum_ 7 месяцев назад

    awesome

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

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

  • @sterling709
    @sterling709 2 года назад

    thank you

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

  • @fitzboivin7060
    @fitzboivin7060 2 года назад

    goooood

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

  • @maxfun6797
    @maxfun6797 2 года назад +1

    Ure so cool bro. Thanks 🫂

  • @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 :(

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

  • @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 :)

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

    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#?????

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

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

  • @irtezamasud1079
    @irtezamasud1079 2 года назад +1

    cool

  • @subirin96
    @subirin96 6 месяцев назад +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  6 месяцев назад +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 6 месяцев назад

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

  • @evanlin7656
    @evanlin7656 2 года назад

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

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

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

  • @kachomer
    @kachomer 2 года назад

    Where is the assets link ? i did not get it ?