MAIN MENU in Unity (Best Menu Tutorial 2024)
HTML-код
- Опубликовано: 2 июн 2024
- Ever wanted to make your own main menu in Unity? Settings, Options, Graphics, Controls and and more! We'll learn how to create, design, add buttons, sliders, toggles, dropdowns and text elements. We'll learn how to code these elements and make our sliders affect text boxes, create dialog boxes, best practises. We will learn how to save this data to PlayerPrefs and then load all these values with some initialisation techniques into your menu! All written in C#.
·························································································
🎁 Get OVER 225+ scripts & projects on my PATREON:
➡️Main Link: bit.ly/SpeedTutorPatreon
➡️Full List: tinyurl.com/STPatreonAssetsList
💰BIG DISCOUNTS on my website, for my UNITY ASSETS:
➡️www.speed-tutor.com
·························································································
➡️Purchase Left Alone (2016) on Steam: tinyurl.com/LeftAlone2024
➡️Wishlist Left Alone: Rebirth on Steam: tinyurl.com/LeftAloneRebirth
🔥SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks
🔥 INSANE UNITY SAVINGS: bit.ly/UnitySalesHub
🕹️Unity Sales: bit.ly/UnitySalesHub
🔥 INSANE HUMBLE SAVINGS: bit.ly/HumbleBundleDeals
🕹️Godot 4 Tutorial Bundle: tinyurl.com/Godot4Bundle
🔥 FANATICAL GAMEDEV BUNDLES: fas.st/t/HYxySc2q
🕹️All GameDev Deals: fas.st/t/HYxySc2q
🔥Synty Discounts & Savings: bit.ly/SyntyLowPolyAssets
·························································································
⭐ Connect with me:
💬| Discord: / discord
🐦| Twitter: / speedtutor
📱 | Facebook: / speedtutoruk
🖥 | Website: www.speed-tutor.com
💝| Make a donation: www.paypal.me/speedtutor
·························································································
00:00:00 - Intro
00:01:18 - What we will create
00:01:51 - Designing the first menu
00:07:44 - Creating New / Load Game Dialog popouts
00:11:58 - Enable & Disable new/load game popout UI’s
00:13:41 - Script to control exit / new game / load game functionality
00:18:02 - Connecting the new/exit/new game script to our menu
00:22:09 - Creation a secondary menu for options selections
00:23:24 - Connecting the Main Menu to secondary menu
00:24:45 - Volume Settings Menu - Designing the Settings popout
00:29:19 - Volume Settings Menu - Scripting what the volume slider will do
00:31:04 - Volume Settings Menu - Saving the volume slider data
00:33:51 - Volume Settings Menu - Linking volume slider to script
00:34:21 - Volume Settings Menu - Making the apply and back button’s function
00:36:53 - Volume Settings Menu - Scripting the reset button
00:40:00 - Gameplay Settings - Designing the gameplay menu popout
00:43:46 - Gameplay Settings - Scripting the toggle and slider
00:48:21 - Gameplay Settings - Making the slider, toggle and buttons work
00:49:03 - Gameplay Settings - Scripting the reset button
00:50:05 - Gameplay Settings - Updating the menu controller variables
00:52:25 - Graphics Settings - Designing the graphics menu popout
00:56:15 - Graphics Settings - Coding brightness slider, fullscreen toggle, quality dropdown
00:59:11 - Graphics Settings - Scripting the graphics apply button and saving
01:01:22 - Graphics Settings - Scripting and populating the resolution dropdown
01:05:37 - Graphics Settings - Scripting the resolution dropdown to change resolution
01:06:47 - Graphics Settings - Adding the script to the Sliders, buttons and toggles
01:08:20 - Graphics Settings - Scripting the graphics reset button
01:11:43 - Graphics Settings - Linking the reset to default graphics button
01:12:03 - Graphics Settings - Building the graphics menu and testing settings
01:13:25 - Loading Preferences using PlayerPrefs (Initialisation Scripting)
01:21:55 - Changing the design, fonts, look of your menu
·························································································
⬇️ SpeedTutor Puzzle / Model / Particle Assets:
🧩Unity Store: bit.ly/STUnityStorePuzzlePacks
🧩My Website Discounts: www.speed-tutor.com/
⬇️ SpeedTutor Best Selling Assets:
🧩Adventure Puzzle Kit: bit.ly/STAdventurePuzzleKit
🧩Note & Letter System: bit.ly/STNoteLetterSystem
🧩Examine System: bit.ly/STExamineSystem
🧩Keypad System: bit.ly/STKeypadSystem
·······················································································
#unity3d #unity2d #mainmenu
The main menu tutorial to RULE THEM ALL! :D See what I did there?
🔥UNITY SAVINGS: bit.ly/UnitySalesHub
🔥SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks
🔥HUMBLE SAVINGS: bit.ly/HumbleBundleDeals
you'll have to watch like 20-50 or more videos to find all that stuff, now it's on one video. that's a very helpful tutorial mate, kinda every element that a menu has. ❤️
u
can you please also pin the Asset for the PlayerPref Editor? cause i can't find it
Awesome!! This is the most in-depth, yet simplest video I've found about creating a well-structured menu system in Unity. I've learned so much by following along step-by-step and I thank you so much for that ❤️❤️
I really appreciate you saying so, thanks so much for taking a look at it and commenting! :)
This was brilliant! It took me a while to go all the way through, but I learned so much by doing all the different tasks. Thank you for creating this tutorial. It's such a good learning tool, as well as being an awesome menu!
I really appreciate you sticking with this! You're a hero and I'm glad you took a lot out of it too. :D
Dude! Well executed, I've learnt so much from this video regarding Unity than most vids out there!... Cheers to you young fella, Godspeed!
I appreciate you coming so far from Middle earth to watch my video, best of luck in your travels! :)
TNice tutorials is by far, the best tutorial I have found so far. I feel like I’ll be spending a lot of ti on your channel! Thanks man! Keep up the good
There is so much in this tutorial that I have learned that not only applies to the main menu I was initially trying to create, but also my game as whole. I spent the last week going over every concept bit by bit and figuring out how I could apply this to other areas I'm trying to create and to better organize my project. Something as simple as the apply button confirmation box taught me how I could activate and deactivate objects from a script, and that's just one example.
I've only picked up unity in the last couple months so I have a limited perspective, but I would argue this is the best tutorial for learning how unity works as a whole, as I've gleaned more from this than the dozens of other videos I've been watching.
Thank you SO much for creating this tutorial, you have helped me on a level I was not expecting to find.
Hey there! I'm really glad you enjoyed the tutorial and learning from it. I struggled with this massively myself. You seem pretty forward thinking, just remember there is always a million ways to do something within Unity and programming - My example is merely a suggestion to get you started. You wouldn't believe how long it took me to put this menu together and then create the tutorial to go along side it. Best of luck with all your projects and learning! I hope to see you around again! :D
@SpeedTutor I can only imagine how long it took you to put this together, It's taken me over a week just to watch it and finish the menu lol
I've actually already modified the load game button slightly to take you directly to an error screen saying no data found if it can't find any game data, rather than needing to click through two menus. Did this by adding two SerializedField game objects to the menu controller and set them to activate based on the if statement you used for the original Load button. A small change, but one I think improves the user experience.
I'm hoping to use this concept later for conditional options in game for things like shops or possible dialogue selections, but I'll cross that bridge when I come to it. For now I'm just happy to have my menu done and to have learned as much as I have for the process. Thanks again for the tutorial, really appreciate the time you've put into it.
As someone who has been through their fair share of tutorials, I heavily applaud this one. I am beginner ( somewhat) and this is so helpful and informative at a good pace. I usually have to redo a tutorial several times before things run right but this one i was one and done. I cant praise this enough~thank you
You're very welcome, my friend! :D I'm really glad you found it useful because it took quite a while to put together! :)
Some channels don't understand that people don't want to make a basic three-button menu. I appreciate you going out of your way to explain as many possible menu options as you could and within realtime speed rather than using sped-up footage. That's a huge pet peeve with tutorials for me.
Haha, I know exactly what you mean. I try my best but I appreciate you coming to comment because this took me a long time to make.
Omg, you explained it very simply! It's really easy to understand. Thank you so much! I've always wanted to learn these.
You're very welcome! :D
Thanks for the video, it's really helpful to have all these things explained in one video! :D
Thanks man! I really appreciate it. :)
Would really love to see an implementation of a menu using the new input system. Having menu system for keyboard/mouse (no point and click) or game pad would be extremely helpful. I’ve found next to nothing about implementing this.
I tried to look into the new input system myself but it's like hell on earth, lots of people have different implementations, the Unity official resources have very limited information. I highly recommend using some pre-existing input systems which are far more refined, like Rewired. I have a tutorial on it and it can do everything you want and the referencing to script is much easier too. It's very well documented! :) Best of luck all the same.
Thank you so much, I’m learning tNice tutorials in quarantine and you made it very simple I really appreciate it, thank you for going over every little
Best Main menu tutorial I have ever seen,I will use this in my project,BIG thanks for the tutorial video!!
I'm really glad it was helpful! Good luck with your projects, do let me know how everything goes! :D
if your resolutions are duplicating when you build the game, replace resolutions = Screen.resolutions with resolutions = Screen.resolutions.Select(resolution => new Resolution { width = resolution.width, height = resolution.height }).Distinct().ToArray();
make sure you have using System.Linq at the top.
Thanks for your suggestions! :) I hope that will be helpful to a lot of people.
What a video bro! Can't thank you enough! Thank you so much you made life so much easier!
I'm really glad I have, best of luck! :D
Thank you so much!! I had no idea where to start, and this helped me create a full-blown main menu!
That's amazing! I'm really happy that you've managed to do it. Thanks for checking my video out.
Finally soone who speaks in a calm way and getting to the point asap
You deserve million subs for sure! Thank you for sharing this with us for free!
You're very welcome!
This is amazing and helpful too! Thank you very much for putting your time and effort for us!!! :)
You're most welcome, my friend! :D
With your videos my learning curve will shrink drastically. Thank you.
Very welcome!
This really set the stage for the rest of my project, actually! I didn't realize buttons were so straight forward. Thank you so much for putting this video together. It's Speedy, as the name suggests, but once I let everything digest and replicated it a few times I really got a lot of "What IS this code doing" and "AHA!" moments. Which, I really appreciate.
I'm glad you're slowly becoming happier with it all, it does take a lot of repetition but as you said. The best way is just practise in real-world situations that you will use daily! :)
@@SpeedTutor thank you :) yeah, I've just started recreating games from the barest of essentials. So as you can imagine it's a lot of repetition. Really appreciating your videos now, wish I had found such comprehensive tutorials before, but I can't do much about that now other than leave mentions on my barely followed insta lol
This vid got me subbed. Thanks for adding some essential content for amateur devs like me.
Thanks man! I really appreciate it! :)
Thanks for this! Massively helpful and an easy guide.
1:05:08 Those following along, be careful here. He adds the SetResolution(int resolutionIndex) method before setting
resolutionDropdown.AddOptions(options);
resolutionDropdown.value = currentResolutionIndex;
resolutionDropdown.RefreshShownValue();
Then, when he rejoins the from the cut in the video, the above three lines are missing but the SetResolution method is there. I thought those lines weren't needed anymore, so I deleted them. The cool thing is, after spending a while scratching my head, I figured it out for myself thanks to the teacher's ability to prepare my brain! Great!
Yes, sorry about that. When you're structuring a video as big as this and one minor error comes along. You have to use the magic of editing to work around, so sorry for any confusion but I'm glad you worked it all out! Fantastic stuff! :D
@@SpeedTutor No worries at all, the video is excellent!
Thanks for the video, but on this specific point no one thought to post the solution for us lesser inclined intellectuals?
@@dutchiewonderz6553 You just leave them in. He created the SetResolution function first and then add those three lines to Start(), but he has that backwards in the video so it seems like the three lines just disappear.
@@adeadaxe Thank You!!
Beautiful man, you're the only one who could help me, I watched 5 videos and yours was the only one that saved me
Glad to hear it!
I followed the instructions and it easily worked!
Great tutorial! Can you do something like this in type of tutorial, but using the new starter pack and create a third person? Something really basic ^_^
I would love to know about that too!
The new starter pack to create a 3rd person character?
@@SpeedTutor To create a third person shooter ^^
@@SpeedTutor Something easy with only a weapon
@@NationStudios If you're looking for the best 3rd person shooter tutorial on RUclips check out the Kiwicoder. Skip the rigidbody setup vid though unless you just want to learn but he switches it to a character controller later. It's seriously an incredible tutorial.
Thank you so much for this tutorial TT really saved me. This is the first video I watch from your channel and it was truly helpful to me.
I'm glad you found it helpful, my dude! Thanks for watching! :D
TNice tutorials is literally the best tutorial on RUclips. It's right to the point, and very informative at the sa ti. Thank you so much
Glad it was helpful!
That would be 99 percent of us
Lots of useful information. It's helping me greatly. One critique of mine is that you seem to switch between low level and very intermediate out of nowhere. One second you're saying "Don't forget the semi colen" and then you type out a huge serialized field thing in like 2 seconds. As an example, I feel that I really understand what you're doing in the inspector, but the code makes almost no sense to me whatseover, particularly the sound section. It's really hard to distinguish when you are just naming something yourself or whether something is just hard code.
Yes, sorry about that. I have habits of mentioning very beginner friendly things when it's a semi-involved tutorial. I think this tutorial all in all, requires a little bit of Unity C# knowledge because it's not the easiest thing to put together. Sorry if it confused you but as you can imagine, trying to put over 1 hour of content together with all the stamps, editing and things I needed to remember was a big job. Thanks for watching and I hope you can get something out of it! :)
@@SpeedTutor Thank you for what you do!
Thank you so much for this video!!! I learned so much from watching it and I'm really proud of my first good start menu.
You're very welcome, Bryanna! Amazing to hear that it helped you, thanks for coming to watch. I hope you're now a new subscriber. :D
Wow at last a soft tutorial I can follow! you sir are a genius
damn ❤️ should have titled it "All-In-One Main Menu Tutorial"... 😂😂😂
Haha, thanks Vasilis! I've changed the title, better? :P
@@SpeedTutor oh nice! didn't actually thought you'll do that. i saw how many different elements you covered in this tutorial that's why i said that ;) usually to see all of that you have to watch like 20-50 videos or so. this video is PINNED!! ❤️
Haha! Thanks man! :D
Do the basics first, if it would be easy, everyone would do it
thank you soo much very direct link n works for me love the way you expressed the installation .
Even though it was a lot, its exactly what i was looking for with such great brief explanations. Thanks bruv
You're welcome!
You are a very gifted teacher. I've been teacNice tutorialng soft for over 50 years and really appreciate your video being a beginner in soft soft.
You're very welcome!
Just wanted to express how helpful your videos are!! you are extrely good at explaining tNice tutorialngs in-depth but still at a basic level for
Glad you like them!
Great video. Really easy to understand and gave me knowledge which I could transfer over into building a simple pause menu by myself.
I'm glad you found it so useful! :) Will you be using it in your own game?
Definitely, it looks super cool.@@SpeedTutor
i love you my man, always wanted soft like this! THANKS
No problem!
Exactly what I needed for my project. Already subbed before but not seen this vid. Thanks for being a life saver
I'm really glad you've found it helpful! Thanks for checking this out my friend! :D
Hello, bro. You can send me the files. just so I can study? When I work, I make more errors. just for our school project. Thank you.
seriously helped thank you!!
Great video and really helpful! I couldn't get a grasp on how the setuper works but it's all clear now.
Glad you liked it!
Really good video, very concise and clear. Saved my uni assignment
I'm glad you think so, my man! Haha. Glad to be of service, best of luck with the next one ;)
Top shelf tutorial as always! Thanks ST!
Thanks Gabriel, nice to see you! :)
This is amazing, thanks for giving us so much useful information in an easy to understand way!, you´re a great teacher.
I really appreciate the kinds words! Thanks for checking this out and best of luck making your own menu! :D
using it for a few years and now I want to upgrade and I'm happy I did that.
This is actually pog content wth! Good job Matt
Thanks man, I really appreciate it! :)
confused but now it all makes sense. Thank you.
Installed, everything works, thanks!
Great to hear!
OMG, it really worked. Thank you so much!!
Glad it helped!
THIS HELPED ME SO MUCH! THANK YOU!
You're welcome!
THANKS FOR THIS IV BEEN SEARCHING FO SOOO LONG
Great job man!! Nice and easy to follow along
That's fantastic to hear! Thanks so much! :)
I’ve watched hours of videos and tNice tutorials one is the first that explains it in a way a complete beginner could understand! Great video
You're very welcome!
Thanks bud! great video and instructions.
No problem 👍
Thank you so much your instructions were so easy to follow !! This helper a lot ❤️
You are so welcome!
This was so helpful!! Thank you
You're so welcome!
Wow what an acNice tutorialevent! Best of luck for the rest of your future, I’m looking forward to being able to invest when I turn 21 in November!
Absolute legend. Nice one
Great video as always!
Glad you enjoyed!
BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!
You are welcome!
Woah, great video mate!
Glad you enjoyed it!
awesome tutorial, thank you so much!
You're very welcome! :D
I just tried this method and it really works perfectly for me. Thank you.
You're welcome!
Thanks for your easy to follow explanations
Glad it was helpful!
You are a life saver! Kudos to you! You rock!!
As for me, everything is simple and clear. Thank you
You're welcome!
Thank you for creating this! It helped me a lot
I'm really glad you think so! :D
You're awesome bro! Tysm for this, pure gold ❤!
You're very welcome, what are you trying to create? :)
I'm developing a psy terror walking sim inspired by Gone Home but with some terror spicy features like silent hill. We'll see what comes out of that 😅. It's 100% personal, nothing to do with steam or pointed into the market, just to learn and have fun coding. Anyways, all of your tuts are incredibly helpful, can't imagine how much hours you spend in total between creating your games and your content 😬. So much respect to you!
Looks good Matt 👌, I'll watch all of it tomorrow m8!
Thanks Roy! :) Let me know what you think.
You rock man !!! the best method ever !! thanks for sharing !!
You're welcome!
Very nice explanatory video!
Glad you liked it
Helped A Lot! Thanks!
Glad to hear it!
It´s working great. Thank you so much for sharing
Glad to hear that
in the resolution part it says that object reference not set to an instance of an object
and the resolution have option a option b option c not 1920x1080 etc...can u help me wiht it
Thankyou for actually explaining tNice tutorialngs. Other videos that I watched started talking about how to make soft and didn't ntion anytNice tutorialng
TNice tutorials comnt from you is legendary. Uncomplicated like your video!!!
Glad to hear that!
Ima download it thanks for sharing!!
No problem!!
THIS IS A GOLDEN GEM. I have this saved for later on yt for any and EVERY ui help I need
Haha, you'll have to let me know what you think of it, my friend! :D
it worked! thank you so much!!
You're welcome!
This worked incredibly well! I can finally play it thanks
Glad I could help!
do more of this!! this is amazing
thank you so much. tNice tutorials helped a lot
thank you straight to the point
Thank you so much ! Nothing to say, that's perfect to begin. Coming from web dev, it feels hard to make dialogs one by one, it's so long ! I'll try to see if i can make them more dynamically.
You're very welcome! :) I'm glad I could help you get started, good luck with your developing! :)
Worked for me thank you!❤️
Glad it helped!
very very gooood, thaaankss maan✨✨✨✨✨✨✨✨✨✨
Hands down tNice tutorials is one of the best tutorials I've seen on any subject, ever! Clear, concise and incredibly informative and easy to follow.
You're very welcome!
This really looks awesome....
You nailed it 😁
Haha, thanks man! I really appreciate it.
ty cuz ive been having a hard ti getting started.
Thank you so much Sensei! You are a blessing!
My pleasure!
Thank you, it works perfect!
You're welcome!
normally i dont give reviews but maam youre amazing
Thank you so much for making stuff in soft a lot easier to understand.
Glad it was helpful!
Thank you for sharing this tutorial
Glad it was helpful!
You are an excellent instructor. I will stick with you.
Awesome! Thank you!
This is great, thank you!
Glad you liked it!
Thank you so much for this tutorial !
You're most welcome! :D
Really good walk-through!
I'm glad you found it helpful! :D
Worked , thanks a lot!
Fantastic! Great to hear it! :D