How To Create A Dropdown in Unity | Beginner UI Tutorial & Scripting

  Рет қаралды 23,984

SpeedTutor

SpeedTutor

Күн бұрын

This tutorial will show you a basic example of creating a UI dropdown and controlling the actions through code, so when we choose a option it will run some code that we have written. All written in C# and suitable for TextMeshPro or the default Unity UI.
➡️Post Processing Tutorial: • Scripting Post Process...
➡️Patreon Files - Single Script: / 73303651
➡️Patreon Files - Full Project: / 73303703
🎁 Get OVER 165+ Scripts, Projects and premium content on my PATREON HERE:
➡️bit.ly/SpeedTutorPatreon
·························································································
🔥 INSANE UNITY SAVINGS: bit.ly/UnitySalesHub
🕹️Unity POWER UP Mega Bundle: bit.ly/UnitySalesHub
🕹️SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks
🕹️Unity New Release Discount Sale: prf.hn/l/BdvEmg3
🕹️Unity WELCOME2022 Offer: bit.ly/UnityWelcome2022OFFER
🔥 INSANE HUMBLE SAVINGS: bit.ly/HumbleBundleDeals
🕹️NatureManfacture Bundle: bit.ly/NatureTerrainHumbleBundle
🕹️Unity ART Bundle: bit.ly/ProgrammingMegaBundle
🕹️Unity Tutorial 2022 Bundle: bit.ly/LearnUnityGamesTutoria...
🕹️Indie Game SFX: bit.ly/IndieGameSFXHumble
🕹️Games Design Theory Humble: bit.ly/GameDesignTheoryHumble
🔥Unity Materials / Files & More:
🕹️CGAxis 1000+ 3D Model Sale: bit.ly/CGAxis1000ModelBundle
🕹️CGAxis PBR Deals: bit.ly/CGAxisPBRDeals
🕹️Synty Assets: bit.ly/SyntyLowPolyAssets
🕹️Filebase Assets: filebase.gamedevhq.com/ (Code: SPEEDTUTOR2022 - Sign up for a FREE MONTH)
🔥 UNITY SUBSCRIPTIONS:
🕹️Unity Plus: bit.ly/UnityPlusDeals
🕹️Unity Pro: bit.ly/UnityProDeals
·························································································
💰BIG DISCOUNTS on my website, for my UNITY ASSETS:
➡️www.speed-tutor.com
💬Join the Community Discord:
➡️ / discord
💝 Make a donation to the channel:
➡️www.paypal.me/speedtutor
·························································································
⬇️ SpeedTutor Puzzle 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
⬇️SpeedTutor Model Packs:
🧩Unity Store: bit.ly/STUnityStoreModelPacks
🧩My Website Discounts: www.speed-tutor.com/
My Assets include: Gas Mask, Flashlight, Generator, Themed Key , Padlock, Phone, Chess Puzzle, Lever, Valve Puzzle, Fuse Box & Safe Systems. Cardboard, Debris, Massive Models and more!
························································································
⭐ Connect with me:
💬| Discord: / discord
🐦| Twitter: / speedtutor
📱 | Facebook: / speedtutoruk
🖥 | Website: www.speed-tutor.com
·······················································································
#SpeedTutor #Unity #Dropdown

Пікірлер: 57
@SpeedTutor
@SpeedTutor Жыл бұрын
I got asked to make a dropdown tutorial so here it is, let me drop this knowledge into your life! :D 🔥NEW UNITY SALE!!: bit.ly/UnitySalesHub 🔥SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks 🔥HUMBLE SAVINGS: bit.ly/HumbleBundleDeals
@lokosstratos7192
@lokosstratos7192 Жыл бұрын
what a timing! i literally wanted to start doing ui/buttons etc this would be a great help Thank you
@SpeedTutor
@SpeedTutor Жыл бұрын
I'm glad you found it useful! Good luck with your UI's :D
@SelaMalka
@SelaMalka Жыл бұрын
Exactly what I was looking for! Thank you!
@SpeedTutor
@SpeedTutor Жыл бұрын
You're very welcome! I hope you found it useful and good luck! :D
@gmangman123
@gmangman123 Жыл бұрын
very usefull tutorial again. Thx my friend!
@SpeedTutor
@SpeedTutor Жыл бұрын
Thank you! Cheers!
@MatanNaveh
@MatanNaveh 9 ай бұрын
Awesome! Thanks
@SpeedTutor
@SpeedTutor 9 ай бұрын
You're very welcome! How did you find me? :)
@sonwukong001
@sonwukong001 Жыл бұрын
Looks excellent, it would be interesting to see how it can be done in the new UI toolkit
@SpeedTutor
@SpeedTutor Жыл бұрын
Thanks for checking this out, I'll have to practise with the UI toolkit, as I've never tried it. :)
@sonwukong001
@sonwukong001 Жыл бұрын
@@SpeedTutor it was just an idea, I do really like your channel thanks 😀
@SpeedTutor
@SpeedTutor Жыл бұрын
I really appreciate it! :D
@ABLGR
@ABLGR Жыл бұрын
ty very much
@SpeedTutor
@SpeedTutor Жыл бұрын
You're very welcome, thanks for checking this out! :D
@random_precision_software
@random_precision_software Жыл бұрын
Hi Matt, just the man! Is there any way of creating or having a reflection probe on UI text?
@SpeedTutor
@SpeedTutor Жыл бұрын
As in, having UI text which is reflective? :o
@random_precision_software
@random_precision_software Жыл бұрын
@@SpeedTutor yea m8.
@random_precision_software
@random_precision_software Жыл бұрын
@@ramunator5622 I have.... and not much out there.. And I'd rather get the answer off someone I trust, wether it's possible or not.
@StigDesign
@StigDesign Жыл бұрын
@@random_precision_software i think textmeshpro and assign a matterial to the tmp text object :) am not sure tho.
@random_precision_software
@random_precision_software Жыл бұрын
@@StigDesign yea, I was thinking that was the only way myself. Thnx
@ghoste2755
@ghoste2755 Жыл бұрын
When I add the script on the "On Value Changed" event thing, I get a number next to it saying "0" which can be changed, whenever I change the dropdown, it doesn't actually change the selected option, it DISPLAYS the second option, but in reality, nothing changed
@monkey1371
@monkey1371 Жыл бұрын
I just ran into the same problem. Did you find any solution?
@monkey1371
@monkey1371 Жыл бұрын
Update: I fixed this as followed: When selecting the function OnValueChanged calls, you have to select the function at the top of the list in the "dynmaic int" section, not the one from the "static parameters" list below.
@ratzpop
@ratzpop 10 ай бұрын
ty bro@@monkey1371
@aelren
@aelren Жыл бұрын
bit confused for newbie. But, very useful if know bit about unity. nice tutorial
@SpeedTutor
@SpeedTutor Жыл бұрын
What's up? Need anything explaining?
@aelren
@aelren Жыл бұрын
​@@SpeedTutor at first i'm bit confused to make the UI. But, after bit struggle i'm okay now. i can finish your tutorial. thank you.
@BmoreGaming
@BmoreGaming 9 ай бұрын
Great Tutorial! I'm curious though, I thought in order to change anything during runtime the code would need to be within the Update method. Why is that not the case here?
@SpeedTutor
@SpeedTutor 9 ай бұрын
No, absolutely not. Update is ONLY if you need to check at all times to see if something has happened. An example of the legacy input system, you wanted to check if someone will ever press a button and look out for it. Update should be avoided if you can help it, so if you do things on events like the UI's are, then it happens when the UI event changes. Then you run a method that only fires when you tell it to do so :) I hope that helps.
@BmoreGaming
@BmoreGaming 9 ай бұрын
@@SpeedTutor It helps a ton! Thank you for the detailed response!
@SpeedTutor
@SpeedTutor 9 ай бұрын
You're very welcome, my friend! :)
@amaniwebber-schultz1796
@amaniwebber-schultz1796 Жыл бұрын
Wondering if you’d have any advice on how to change the size of a game object from a press on the drop down?
@SpeedTutor
@SpeedTutor Жыл бұрын
You could run some code which scales your specific object within those options on the dropdown.
@thewebexpert3311
@thewebexpert3311 24 күн бұрын
Is there a place I can download this example? Not only is my number not updating properly, the list isn't expanding the way it should.
@SpeedTutor
@SpeedTutor 24 күн бұрын
It's all on my Patreon :)
@peterwan小P
@peterwan小P Жыл бұрын
I cannot click at my dropdown box and show the dropdown options by default for some reasons...... I am using TM Pro v3.0.x
@SpeedTutor
@SpeedTutor Жыл бұрын
I'm not sure without seeing the example but make sure anything you have isn't blocked by other UI elements, the UI element allows for raycasting (Usually a tickbox) and see if you remove the canvas, create a new one with a button and slowly work out what the issue is :)
@peterwan小P
@peterwan小P Жыл бұрын
@@SpeedTutor I switched the tag to none and it sort of works now. The hit box seems to be at the bottom of the drop-down menu. If I click the middle of the menu it does not response. I am just completely puzzled by this behaviour 😵‍💫😵‍💫😵‍💫 but since it is sort of clickable now, I think it’s fine?
@SpeedTutor
@SpeedTutor Жыл бұрын
I'm sorry I can't be more specific, but if it's functional for your usage then I guess it's fine but what about if you create a dropdown again? Try it within it's default state on a new canvas and see if it works?
@オタクもの
@オタクもの Жыл бұрын
How do i make tmpro ui text
@SpeedTutor
@SpeedTutor Жыл бұрын
Right click UI > Text (TMPro)
@robertogiudici6683
@robertogiudici6683 4 ай бұрын
You use a Text label as variable, that seems creepy
@SpeedTutor
@SpeedTutor 4 ай бұрын
You're entitled to do it whatever way you deem best :)
@ihx7
@ihx7 Жыл бұрын
ur video is too quiet
@SpeedTutor
@SpeedTutor Жыл бұрын
That's strange because it's pretty loud for me :(
@ihx7
@ihx7 Жыл бұрын
@@SpeedTutor i think partly its because i had my settings wrong before but its still definitely at least a bit quieter than other videos
@SpeedTutor
@SpeedTutor Жыл бұрын
Well sorry about that one, I always record my audio with the same volume and reduce by -12db in editing but this one could be the anomaly. I hope you can still hear it! :)
@ihx7
@ihx7 Жыл бұрын
@@SpeedTutor why do you lower it I mean you can’t raise the volume of videos much but you can lower it to 0
@SpeedTutor
@SpeedTutor Жыл бұрын
My original recording is always incredibly loud, if I didn't lower the audio in editing your ears would be blasted at about 2 volume. Haha. I have it like this because I test on headphones and speakers. Around half volume is usually pretty damn loud, as I get complaints otherwise! :)
@yaroslavmakarov2218
@yaroslavmakarov2218 Жыл бұрын
How about to create a tuts not for 5 years old children?
@SpeedTutor
@SpeedTutor Жыл бұрын
I appreciate your opinion but I was asked to make this and try my best to cater for everyone, I wasn't at home today when I usually make MWU. Ironically these types of tutorials usually do 4-5x better than ones I'll genuinely spend a week making. This was just a stop gap for this Monday :)
@Dare_1796
@Dare_1796 Жыл бұрын
How about find something more productive to do with your time than critize a channel that you took the time to watch. How about a thank you and constructive criticism?
@yaroslavmakarov2218
@yaroslavmakarov2218 Жыл бұрын
@@Dare_1796 That was pretty constructive. There are a lot of tuts about absolutely basic stuff and i would like to see more advanced topics. Understand now?
@aprimic
@aprimic Жыл бұрын
Plus there's already a textmesh pro drop-down you can edit
Build and code a Settings Menu | Unity Beginner Tutorial
12:33
The Unity Dude
Рет қаралды 9 М.
Making UI That Looks Good In Unity
18:06
Game Dev Guide
Рет қаралды 665 М.
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 13 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 23 МЛН
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Chapitosiki
Рет қаралды 4,9 МЛН
How to make a menu in Unity - UI Tutorial
26:27
Tarodev
Рет қаралды 182 М.
How To Create UI SLIDER in Unity (UI Tutorial 2023)
6:28
SpeedTutor
Рет қаралды 11 М.
Unity UI Tutorial - Dropdown with Images!
21:37
Sloan Kelly
Рет қаралды 42 М.
UI TOOLKIT || Beginner Unity Tutorial
11:03
Freedom Coding
Рет қаралды 3,1 М.
Creating a Custom Tab System in Unity
13:45
Game Dev Guide
Рет қаралды 230 М.
What Happened To Google Search?
14:05
Enrico Tartarotti
Рет қаралды 3,1 МЛН
PAUSE MENU in Unity
12:13
Brackeys
Рет қаралды 982 М.
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 13 МЛН