Unity Button Tutorial

  Рет қаралды 39,171

AIA

AIA

Күн бұрын

It's hard to think of any game that's worth mentioning which doesn't make use of buttons. Whether they're being used to navigate around menus, between scenes, to buy items at shops, count clicks, or progress dialogue, buttons are a cornerstone in video games. In a previous video, we went over how to create UI in unity. In that video, we created some buttons but didn't talk much about the button component or assign any functionality to them. In this video, we'll detail the button component and create two different functions for our buttons, one to change scenes, and one to quit.
► Socials
Twitter: / the_real_aia
Discord: / discord
My free web games: aiadev.fun/
► Get the script: unicornone.gumroad.com/l/butt...
► Unity UI Tutorial: • Unity UI Tutorial | An...
► Button Navigation: • Controller and Keyboar...
► Download Unity 3D: on.unity.com/3cbxhXY
For more educational content on video game development, unity tutorials, and c# programming don't forget to subscribe!
Chapters:
0:00 Introduction
0:41 Understanding the button component
2:27 Creating a C# script with button functions
4:50 Assigning Button OnClick functions
7:20 Testing the buttons
7:44 Outro
········································­­·······································­·­····
****
Get a 90% discount on a .fun domain for one year on www.get.fun using the coupon “AIA”
****

#unity3d #unitytutorial #gamedev

Пікірлер: 26
@AIAdev
@AIAdev 2 жыл бұрын
Having trouble with anything in unity? Let me know what you'd like to see a tutorial about next.
@edoardo_maresca
@edoardo_maresca 11 ай бұрын
there is an error on Line 6, LoadScene("sceneName"); my app is saying I should use UnloadScene.
@NinjaKnight612
@NinjaKnight612 4 ай бұрын
me butters don't show up
@jakproductions94
@jakproductions94 Жыл бұрын
Oh my gosh thank you so much for this tutorial series. It has helped me so much with my game!
@amosf.2780
@amosf.2780 Жыл бұрын
This is the best tutorial I have ever seen ! Thank you so much!!
@hologrammaster2468
@hologrammaster2468 2 жыл бұрын
Thank you, this was really easy to follow, keep up the good work!
@AIAdev
@AIAdev 2 жыл бұрын
Glad it helped!
@theenten4579
@theenten4579 2 жыл бұрын
This worked! The function wasn't showing up when I put the script in, but when I put the object in, it worked. Thanks!
@AIAdev
@AIAdev 2 жыл бұрын
You're welcome :)
@arthurpaixao4132
@arthurpaixao4132 Жыл бұрын
Every Serialized Field (those fields we can drag things into) has a Type written in the parentheses on its right. If you see like: Thing (Object) That means that field expects you to put an Object into it. Same goes for every type. If it expects a Transform, it will show "Thing (Transform)", if it expects a RigidBody, it will show "Thing (RigidBody)", etc. I don't know, maybe you have already figured this out, but it might help someone idk
@arthurpaixao4132
@arthurpaixao4132 Жыл бұрын
Oh one more example: If the Serialized Field expects a specific component, you can also drag and drop an *Object* that contains that component, and then that object's *component* will be assigned. 😉
@khiaralas8378
@khiaralas8378 Ай бұрын
This is so great! Thank you for this
@korbyntalks
@korbyntalks Жыл бұрын
Thank you so much for this tutorial
@Skitozzz
@Skitozzz Жыл бұрын
Thanks this help so much!
@polasbeatz
@polasbeatz 2 ай бұрын
Thank you, mate. You saved my life. 💯🙏
@tunaosu
@tunaosu 2 ай бұрын
nice button tutorial
@user-ki2lf4yx1e
@user-ki2lf4yx1e Жыл бұрын
THANKYOU!
@zylorixus
@zylorixus 2 жыл бұрын
Thanks for this video and can you make video about quit game
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS 10 ай бұрын
Thank you so much. I know how to make games and code but only in Visual Scripting. After discovering how bad the performance is with Visual Scripting, I'm switching to C# coding and now I have to relearn 95% of everything again
@user-ck5ee4mo8b
@user-ck5ee4mo8b 8 ай бұрын
Спасибо за видео, было полезно, я узнал много нового.
@fictitiousnightmares
@fictitiousnightmares Ай бұрын
I'm more curious about your code for your character/player movement in that platform game. A recent tutorial I did used the physics engine and applied force to the rigidbody2D but that was NOT a good movement for platformers. Your game has excellent movement from what I saw and that is what I want to learn how to do properly.
@faiksami94
@faiksami94 Жыл бұрын
I am getting the error of script class cannot be found. May I as for any suggestions again ?
@fandeBuzz
@fandeBuzz Жыл бұрын
What's the game at 0:29?
@atreidesson
@atreidesson Жыл бұрын
well, all that I have learned is that "public class" deosn't mean that all is public
@kenamia9136
@kenamia9136 Жыл бұрын
Unity could have made this process much better.
@AIAdev
@AIAdev Жыл бұрын
What would you suggest? I’ve got some Unity contacts
How to EASILY make a TIMER in Unity
13:04
AIA
Рет қаралды 37 М.
START MENU in Unity
12:52
Brackeys
Рет қаралды 3 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 25 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,3 МЛН
Making a Game With Discord's Bot API
10:39
PolyMars
Рет қаралды 2,6 МЛН
I Paid Fiverr Game Developers to Make the Same Game
10:25
BadGameDev
Рет қаралды 639 М.
How Animate UI BUTTONS in Unity (Easiest Way)
7:53
BudGames
Рет қаралды 18 М.
Unity UI Tutorial | An introduction
28:21
AIA
Рет қаралды 211 М.
How to make a HEALTH BAR in Unity!
21:06
Brackeys
Рет қаралды 1,1 МЛН
Unity Tutorial: Open Panel on Button Click
3:39
Jayanam
Рет қаралды 170 М.
2 Years MAKING an OPEN-WORLD game
10:12
AIA
Рет қаралды 99 М.
Pro game dev tries Scratch
5:11
AIA
Рет қаралды 26 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 3,9 МЛН