START MENU in Unity
HTML-код
- Опубликовано: 28 ноя 2017
- Learn how to make a main menu using Unity!
● www.assetstore.unity3d.com/#!...
● Developer Forum: forum.brackeys.com/
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
► Join Discord: / discord
♥ Subscribe: bit.ly/1kMekJV
● Website: brackeys.com/
● Facebook: / brackeys
● Twitter: / brackeystweet
····················································································
Edited by the lovely Sofibab.
····················································································
► All content by Brackeys is 100% free. We believe that education should be available for everyone.
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
♪ Baby Plays Electro Games
teknoaxe.com/cgi-bin/link_code...
FYI this tutorial still works (in general). There are still a few problems in this tutorial as Unity has updated and things have changed. Here are some problems people seem to be facing with the fixes:
1 - Background Image can't be applied
Select the image from your assets folder and open it in the inspector. Change the texture type from (Default) to (Sprite 2D and UI). It can now be used as an Image in the UI
2 - Game Scene is dark after running Menu Scene
In both scenes go Window > Rendering > Lighting > Scene and at the bottom click on the arrow on the Generate Lighting Tab. Disable (Auto Generate) if it's on, then select Clear Baked Data, then select generate lighting.
3 - TextMeshPro not in asset store
TextMeshPro is now built into Unity and can be used without needing to download further files. It can be used as an alternative to basic (Text).
Thank you this was very helpful.
man doing god’s work over here, tysm
Not all heroes wear capes.
Super! thanks man
thanks man, you helped me with the dark scene lol
There are 3 times you visit a Brackey's tutorial:
The first one is when you copy it.
The second one is when you forget one thing.
The third one is when you show it to a friend.
true af
Why does my MainMenu script not show in "on click" plz help me
Why does my MainMenu script not show in "on click" plz help me
@@dubby7189 put the button as a child in an empty game object called menu, the add menu script to menu
@@Adomas_B what?
0:00 Intoduction
0:12 Canvas and Panels
1:30 Text Mesh Pro
3:10 Colour Gradient
4:00 Text to Button
5:10 Duplicate Button
6:25 Basic Options menu and Slider
8:00 Functionality
10:20 Add Actions to Buttons
good job
Also here is the code if anyone wants to copy paste, but i recommend watching the video its pretty educational
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class mainmenu : MonoBehaviour {
public void PlayGame()
{
SceneManager.LoadScene(1);
}
public void QuitGame ()
{
Debug.Log("QUIT!");
Application.Quit();
}
}
@@ZomBeeDabadee THANK YOU SO MUCH
@@aarona9525 bro its a couple lines of code
@@nugg3tcraft204 it's been 2 months y do you care?
I'm actually pretty surprised at how building a game is 20% work and 80% polishing the finer detail.
But polishing the finer details is still work. So it's 100% work.
I hope its like that
for guys who needs help in highlighted color u need to check the image in the bottun setting
@@earthIing he talked about it
@@earthIing 7:55
Thank you! you are always amazing. I took up coding about 2 years ago and then had a baby and put my dreams on hold. Now hes a bit older, I'm less preoccupied with things and want to get back into it. I am so surprised how much I remember and re watching your videos has helped so much. Thank you again!
Great tutorial as always! When I was doing menu switching in my project, I had a separate function that took care of the switching. I didn't think of using it the way you did it. Pretty damn neat. Thanks!
braceys acidently raps:
"I'm going to make a slider, and make it a bit wider."
LMFAO
he IS actually a raper : }
..and a bit taller
@@dr.kamranhabeeb9969 hes a fuckin what
@@dr.kamranhabeeb9969 umm.. i think u should edit that
The best tutorial I've found on the topic so far: exact, clear, condense.
can you find the text mesh folder in unity asset store? i cant find it
@@reyeszenpai7265 As far as I can see, it’s included in unity by default now, see in UI submenu when creating game object
@@KuzmaProDev i had the same problem. it is built in to the unity editor now
Not only an options menu, but also making different graphics and resolution of your game for different settings.
Great video, btw
Ico Ivo I suggest you watch sebastian lague or gamegrinds videos on an option menu they are super easy to understand
Everytime I click a unity tutorial on youtube and Brackeys pops up I feel at ease knowing this is gonna be a good tutorial
Rip brackeys. You guys inspired me to make my own game and i am following the 2d ones now. This is a life saver and if you guys are reading this, thank you. From every single one of your subscribers.
bro he's alive 💀💀
@@chaoticlabzdev it's okay man the accident wasn't your fault you gotta move on at some point
This was super great! Clear, concise, easy to follow, and exactly what I needed to learn. Thanks!!!
Thank you so much! This really helped me make my menu, more than other tutorials did! I really appriciate this! Keep up the tutorials, man!
Maad respect Brackeys, I've been following your videos for 4 years now and I don't even know why I haven't subscribed to you. Subbed!
@Relecent It's too late now, he quit :(
Great tutorial and love that you explain things on the go, it was a little hard to keep up with your pace. Keep up the good work
I was trying to learn some simple unity scripting to show my boss a proposal and nothing made sense or was relevant, but in your video you made it extremely easy to follow along so thank you!
have have watched this video like 20 times. and everytime he says his menu is more fun then his game gets me
I have gotten to the point where the word "PLAY" looks weird now, i've been looking at this word for like 3 hours
Dude I feel you xD
Actually the same by me today :)
I did it like in the tutorial but when I start the game I cant click at playbutton and it does not have a dark highlightet area :(
Can u help me?
@@fashlehd6883 Ik same for me
@@fashlehd6883 me too
I am seeing the button play, "PALY" or "YPLA", It's really weird.
Its Been 4 Years and this still works. Great job Brackeys!
You actually helped me a lot. I'm new to unity and I'm really glad you did this. Hope all good to you
Man, I missed watching your tutorials. It's great to be back coding again!
"I promise you that it will work" those are the words you don't ever say in computer science 😄
Yes
It doesn't make any sense to promise something about codes😂
true!
play.google.com/store/apps/details?id=com.Scripts.Xo.studio
It's the same thing like "I think I'm almost finish" and "It's just a little bug. It's probably a one-liner"
@@thanksfor17ksubscribe32 wth the video is made with Kine Master and its just bad quality... y did u link it?
Man, you absolutely saved me for a college project. You're the GOAT of YT, Unity and tutorials!
Thank you! This is my first time making a game and all your videos have been very helpful.
Yes!
Please also do an options menu!
Maybe with graphics options?
please a graphics optings tut, i've been wrecking my brain over it
Check out videos from GameGrind or Sebastian Lague they go over this very nicely
Sparrow, same with me haha!
+thanks Codey!
Mahmoud Shatnawi No problem :)
Totally do this, with graphic options, user input (keyboard/ gamepad binding)
Thank you so much!
I for one, personally thank you. I’ve been struggling to create an effective main menu that works. Following your tutorial, has helped me tremendously. You have gained a subscriber.
Well made. Easy to follow and straight to the point. Keep up the good work and thank you very much.
Another great tutorial! I'll definitely implement something like this in my project. These are very concise and easy to understand. How long have you been working with Unity? It seems like you know almost everything about the software.
Sir you are the best man on earth so amazing videos
My whole summer vacations have become fruitfull only because you
Thank You
Soon supporting you on Paetron...❤❤
One of the best programming tutorials I've ever seen. Great work!
This was super easy to follow and incredibly informative, thank you so much!!!
Me every time I watch a Brackeys video: "Alright, sounds simple enough"
Also me when I open up Unity: **90s Router Noises** **Stares Blankly**
YEEEEES IT WORKS! I'm sit 4 hours here before i found the problem! THANKS!!!!
can you help me? when I play the game, the game load scene 2 instead of main menu, I've make sure that following the tutorial step by step
Nerd Addict In your build index do you have The Menu over the Game Scene? 9:16
PLEASE HELP, I DO NOT HAVE THE CHECKBOX, SO I CAN NOT MAKE IT TRUE OR FALSE IN ONCLICK()
WHAT SHOULD I DO TO MAKE IT VISIBLE?????? THANK YOU.
This was a great guide by the way :) Found it MUCH easier to follow compared to others I've tried watching on Unity UI :D
That's pretty sweet.
I had no idea about any of the UI or buttons. You are super helpful. Thanks.
aaa I wait this tuto for a long time 🔥 and I like the new color for your logo
Yasser Sedrati it actually reminds me of his first old logos with the banner and everything maybe he did that on purpose and it's a anniversary or something?
The logo reminds me of the Instagram logo xD
Plofgans yeah true 😂
Yasser Sedrati Hey
hey guys do you know how to import scene to another scene?
I already know how to make a normal start game/quit game menu, but I never experimented with giving options functionality. Next tutorial a functional option menu would be a great idea :D
Love the vids btw
Jasperkiller1 yes
my buttons don't find the "main menu game object" do you know how to fix that?
Thanks mate! You helped me a lot with this tutorial, as i'm recently starting in Unity.
Very clear and straight-forward, even for a newbie like me!
If you are confused and can't find TextMesh Pro in the Asset store, it is already included with your version of Unity (This is only included with versions 2018 and higher)
Yess, I wondered about this. Tysm B)
Like yor new logo!
Thank you man, this is an extremely helpful tutorial for a complete beginner like me.
Thanks for the tutorial, I was freaking out. When I saw your video, I finally maked my game main menu
I've watched a 49 minute video and didn't understand anything. In this video every thing makes sense!
Miksaa Right!! Man this channel is so useful! Its crazy how there are so many programmers out there willing to help others, a very unique community.
Where to get that background?
@@alexandrufilipescu1301 I think it's custom created one.
His tutorials are the best
@@miksaa2867 God bless you.
Classic. You follow a simple tutorial, but nothing goes as expected because you're watching it a year late.
Lol it worked for me
@@cq5857 thanks dude
Worked for me
@@glitchifyed when i put my cursor on the button it doesn't get highlighted please help me??
when i put my cursor on the button it doesn't get highlighted please help me??
That was the best unity tutorial I have used in the entire youtube. Thank you very much!
btw I am so horrible, that I watched it for 2 hours... 13 minutes for 2 hours.
Just wanna let you know that this is a really useful tutorial. Thank you!
can you please make a video on how to make a full options menu with like resolution, graphics, working volume changer for all scenes, controls, etc. Thank You! This video was amazing and really helpful!
Might be like 10 mins or 20 at most
Check out Unity's default FPS 3D game, I beleive it has it in there you can learn from
Anyone using this guide in 2021 or later: You will probably get a SceneManagement error in your Unity Compiler following this guide. First be sure to download the latest version of Microsoft Visual Studio, next be sure to select "Game Development with Unity" when installing, and if you did not just go to Modify to add the version.
Finally and most importantly be sure to in Unity go to Edit>Preferences and select your version of MVS as the preferred editor and if you need to set the compiler check box on. Later version of Unity do not seem to use compiler check box on though.
After that you should be golden and can continue to follow this guide.
How do i go to Modify to add the version?
I love your videos thank you so much for all the work and time you've put in them!!! Can't be thankful enough👍👍👍
so very helpful. Can't wait to get a look at your other ones. Thank you so much.
Just quick thing:
Error: button stays highlighted after clicking it.
Solution: change navigation to "none".
OHH thanks !! :)
Thanks Bro!
DUUDDEEEE YES
You saved my life xD
you're not the hero we deserve... you're the hero we need
Thanks for making me write my first line of code! There´s a long way ahead lol.
LOVE THIS!.. got into some problems and had a hard time but at least works better than most youtubers
You have the best Unity tutorials on RUclips, this video really helped!
from where you got the Textmesh pro? the link is not working or you dont used it?
I would love an options menu tutorial, and I think these are the things you should cover in it:
- Resolution
- Volume (and how to separate music volume and effects volume)
- Graphics options
- Mouse sensitivity
I would also like a tutorial for key binds but I think thats a bit more advanced.
Love your videos!
Ik im late... Like really late. But in his simple game tutorial episodes if you watched it through he shows how to make a move you left and d move you right, you could improvise a little on the code and you would be able to make say L enable a colour change on your player, or obstacle for example. Im sure you know this, but this link docs.unity3d.com/ScriptReference/
Shows you pretty much if not all codes you can use in unity, on the left just click UnityEngine if thats what you are using and then go from there! Good luck!
Please make a tutorial on how to make a shop with SAVING pls 😊
A shop with saving? Save files and shops should be two seperate video's. Or more, since save files require writing and reading from files and shops require items and currency.
kje si nigga...
Leon Čepin You should first learn how to save an read data. Then to make a shop.
OMG Please. I NEED THIS. All the tutorials I have found describe it in such a vague way and I can never seem to get it right on my own.
Just use a scriptable object
You are the best tutorial based youtuber i have encountered. You know how to make complex programming projects and neat coding that i have been looking for, for days. I wish you well and a brilliant career :), subscribed :)
I'm watching this @2x and it's very coherent. Huge respect to you!
I just wanna say that its necessary to have the event system in your canvas, otherwise the button actions wont work i just had a problem when my button didnt work entirely when i deleted the event system , if u already did delete it go to create > UI >event system (Hope this helps someone).
YOU SAVED ME! I Spent too much time thinking why my button action doesn't work at all. But now it's working fine. Thank you so much!
Yoooo thank you i didnt know
THANK YOU SO MUCH
RIP Brackeys. You will be missed.. :(
is he dead?
@@laslodes2550 well his channel is because he stopped it
Does this work on the newest Unity version?
@@FortniteBalls9669 It works with the latest version. You don't have to import the TMP, Unity has it by default now
6 years later and these tutorials are still the best I've seen
Man, its just awesome. your work is fantastic simples a accurated.
RUclips you miss you and your content of unity features
Hello, I Wanted To Ask You How Can I Make An Outline Of An Object If It's Behind A Wall
Thanks
'public void PlayGame ()' if you do not have the PlayGame function, then you should remove the space in the code like this 'public void PlayGame()'. If you get errors then you probably didn't add 'using UnityEngine.SceneManagement;' to the very top of the code (maybe it will help someone)
This helped a lot, couldn’t find why I was having errors. Thank you!
Thank you so much, I was so worried about having to do this! Though it seems unity makes it pretty easy no surprise!
So beautiful, my game from basic Unity tutorial now have a start screen! :D
Hey, Brackeys love your tutorials man! But sometimes I can't see my menu text neither in Scene nor in Game. I'm new to Unity. Am I missing something?
For those who, like me, had a "no function" in the dropdown list of the On Click () behavior, here is what to do:
1) When you created you UI, Unity created a GameObject called "EventSystem".
2) Select "EventSystem" and attach the MainMenu script
3) In the PlayButton and QuitButton, instead of attaching the MainMenu script on the On Click () behavior, attach the "EventSystem" object
4) Now it will show the functions correctly in the dropdown list :)
Thanks a lot!!!
Bless your soul XD
It shows game object, transform, event system, stand-aloneinput module. It does show my main menu script😔
Still didn't work for me ,, the playgame function doesn't show
Awesome tutorial Brackey. Keep up the good work!
I'm pretty sure tears came out of my eyes when I got to the end of the video.
Thanks so much! :)
Before watching Brackeys : *spends 3 hours to make a single menu button*
After watching Brackeys : "finishes the Menu in just 15 mins*
true
UPDATE: If it's not working at all, you might be using the new Input System instead of the Legacy one. Check that (Project Settings -> Player -> Active Input Handling), and if you are, make sure your Event System is updated, containing the new InputSystemUIInputModule. Then apply your inputs in the Actions Asset and assign the inputs to the events ("point", "left click", "submit", etc.). That solved it for me.
im in the player section but cant find the active input handling thing
i scaled up my background and made an animation for it to sway and slapped on some lemmino music. holy MOLY is my game looking good! cant wait to release it! thank you brackeys for everything you've done for us! youre the reason i can actually be a game dev
I always wondered how to do that. Thanks Brackeys!
I can't find TextMesh Pro: default backend - 404
Edit: TextMesh Pro is now by default into Unity
If nothing happens when you click your button, it's because the text is blocking the button. To stop this, go to the button text (TextMeshPro), go under Extra Settings, and turn "Raycast Target" off.
I struggled with this, so I hope this helps.
Yes, this helped me! Thanks. Also, for anyone reading this, pushing your button to the bottom of the hierarchy could help too, other UI elements could be blocking your button.
Thank you!
Thank you so much!! This frustrated me for a while until i found your comment :) :) :)
My goodness, I love you! Thank you!
Thank you bruh! You are really a good man! This lesson is perfect.
Absolutely, unbelievable, unspeakably... INCREDIBLE!
Please make a video about game optimization. Plz
Gai Gai that would be hard if not impossible for him to make. Not only is it extremely vague (most optimizations depend on the program you are writing), but computers are so advanced today that the optimizations he could talk about do not really do anything.
Speedtutor has a video on it
Do an options menu!
Super helpful tutorial! Thank goodness for the pause button.
This channel is the best. Really miss they stopped making new content.
For anyone whose button isn't highlighting on hover or click, try adding a "UI -> Event System" to the menu scene.
@@inigowilloughby7285 Sorry to hear about that, it's just like how you'd add a button or text Game Object just you need to add an Event system object instead. If this is what you've done and you can't find it then I'm not sure what to do, I'm a novice really when it comes to unity I was just relaying what worked for me in my original comment.
@@alasdairingham2095 thank you so much you saved me
wonderful, I deleted that one. Thank you so much!
5:55 just a reminder for me :D
Really great and helpful tutorial, thanks for sharing 👍🏿
So helpful as always. This made it so easy!
brackies, could you teach us how to do splitscreen? UI on split screen would be nice too. that would be great!
you render the image of each player's camera on a raw image. then you create a panel displaying both images at the same time. done
kevin delbecq That would be hard and heavy, it's a nice idea you have but you can just set the cameras to only render half the screen in the inspector...
Me: Makes A great Game In Unity
EventSystem: *No way*
PLEASE HELP, I DO NOT HAVE THE CHECKBOX, SO I CAN NOT MAKE IT TRUE OR FALSE IN ONCLICK()
WHAT SHOULD I DO TO MAKE IT VISIBLE?????? THANK YOU.
@@mehdib1781 You need to make the play, settings, quit as a button
@@obc257 Please show me, i do not know how to do it :)
@@mehdib1781 Same
@@danzy182 How did you fixed it? Thanks :) can you see the checkbox?
Thank you for making this video it helped me a lot kept up the hard work!
Really enjoyed it! and very helpful!!
too the 2 peopel that have the same problem as me where the buttons wont even highlight, make the eventsystem a child of your canvas, then look at the component. if the input system seems to have an error LOOK AT IT it will tell you to update the input system with a very handy button below that to do it for you. i was struggling for 40 minutes before I figured out to do this
Bloody fucking lad right here, major props my dude... also when typing this it's at two likes so bravo
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class NewBehaviourScript : MonoBehaviour {
public void PlayGame ()
{
SceneManager.LoadScene (SceneManager.GetActiveScene ().buildIndex + 1);
}
public void QuitGame ()
{
Debug.Log ("QUIT!");
Application.Quit();
}
}
Thanks! But it is not very complicated, I do not think this was necessary.
@@hadoom848 complicated? (s)he did it to save us time
Thank you so much
Thank You!
you are legend you save my time thx so mush
Thank you so much 🥰🥰🥰, this was so helpful. I really don't know how to code in unity, but there is a very good hint from you.
This video is really cool and helped me a lot and it's a very simple way of making a start menu.
Hi. With newer versions of unity, you already have textmesh pro. You will get many errors if you try to download it like you did. Just a heads up. Personaly i think they now should delete the way to import it. Older versions than 18.2 dont get this problem
you right
they wont delete the import for a while cause a lot of people are still running older versions of unity
Maybe getting a warnong would be smart🤔🤔
Warning**
What's the best way to learn unity? From not knowing C# or anything to being decent? Best tutorial? (I mostly want to do 2d)
ZeCaxy just play around with stuff. Set goals and when you can't reach one without research, then research it. Start small, and big. For example start with giving a rigid body a force in a random direction. End with a random maze generator that uses a nueral network to solve it. It obviously helps if you know programming before hand.
The internet is your friend!
Mr. Adhesive I was the same as you. Learning 3D first helps so much. Then move to 2d
ZeCaxy start small, think of a simple game mechanic you want to implement and research it and make your game around it.
Thanks
ZeCaxy no problem.
I appreciate your tutorials my brother ... congratulations and good video!!!
This is such a simple and amazing tutorial thank you!!!!!!!!