Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Believe in tonight guys v main
You is actually very similar to what we experience
With the demo enter it's just going to be an image with a logo in the Mechanics you little buttons
Now obviously guys you can go as complicated as you want when creating a main menu can make it half animations and
For the purposes of this demo for this tutorial
We're going to make sure
That we just cover the basics and then you guys can extend it polishing have fun with him
How to create a new scene
I'm going to call this mean
Ok
Let's have a good time
Opening
And now we need to actually create
A PSB file
With a logo in a background image
At 40
Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1
And at 3840 by 2160
So what I'm going to do is I'm actually going to open up 2nd car
Recreate
Can I just get a save this as main menu
And I wanted to be a large document format
Data PSB file Photoshop big file
Animal quick save
Ok here
I'm going to delete
All the stuff
From my previous tutorial
So we have a blank canvas here
And then I'm going to go ahead in actually just
What I like to do
Especially when I'm in a rush
I like to take
Previous images of screenshots from the game
Pays them in this is a really quick trick here
Penstemon and what I do is I just blurred them like crazy so big to a big huge blurry
Gothenburg
Until we get this beautiful abstract look
With all of the colours
From our
From our
First level
And then I was gonna crap this so
Control a war Commander if you're on a Mac to select the whole canvas
And crap
Cancel letter background so just call this
Background
Adding my logo
Adding a logo creator
Earlier in this course for Skyline punch
So here is my
Logo I created
Earlier in this course so I'm actually gonna just
Merge these two layers together here
Copy them
And then pays them in here
And you noticed
That I have some blue here we just use the magic wand tool
Interest
Search eat away and just delete that
I know that's not the most ideal solution but blade not guys after 10 years of making games
I still do that kind of stuff
Hey I select and delete things that really should have been deleted in a previous vector
But
Honestly I'm not going to worry about it so I'm going to scale this down to about like this this is our logo here
And I don't really like these Colours here so I'm just going to do white
Wetherspoon menu
Ok
Something like that
Unity over here and that's going to give us a room for buttons
On the right side what we could do we can also if we wanted to we could have the button
Either on the right side or
I could actually just
Or when I can do
Is centre that here and then have the buttons
Blow
But I like having
On the left side ok
That's where I love was going to be so it's a bit logo so it's background and logo two layers that we can use
Honour main menu
But saying that out
I'm just going to double check to make sure
That my main menu has all of a graphics creator
Two backgrounds here looks like a white background was imported as well
Will I need that so I can worry about it
So what I'm going to do is actually go the game object
You are
Image
Ok
In the nursery creative a canvas and also in a vent system I did not use these two
When I created pinstripe so that whole game was created without even using these components and I'll be
To the guys I mean what they do
Turn a worry about those
But we now have this image here ok
So this is going to be our background ok
Search just rename it background
I'm in a dragon my background to the source image
Never go
Set native size
Mean also zero it out
Can you notice that it's much bigger
In Arkansas
So go to the can this year
Go away came descaler
Scale with screen size
And then we're going to the reference resolution to a 4K image which is 3840
DE21 6th
So we have
Her background image we can also head in our logo actually copy the background paste
How many corners logo
How many dragon my logo
Need a size
And I'm going to move it over to the left side
Tomorrow
And then I'm going to make sure
The Anchor preset are set to the centre left
Now you'll notice that if I go to what's a 4 by 3
We now get these blue bars at the top that's because the background image is not stretching to fit
We can actually
Easily fix this by going the background
Inserting the stretch here
Now be careful your guys and I forget this even now after 10 years of making games
If you click this
It's now going to be stuck in this position so if I go back to 16 by 9 it's actually going straight even smaller
Sonos how it's trying to stretch based on that default size you gave it
So go ahead
Instead it back
2 cm
So it's not stretching
Quick set native size
And then go back to 16 by 9
Enven
Set stretching
Ok
So now when we go back
243
It stretches based on that default size size we just gave it
So now
It's dragging to all different screen sizes
And we can't even got a free app back to your and see it
Scaling
No matter what size we have it out it looks good ok
Now let's go ahead and create the buttons
We could technically create images in the Photoshop file
And use those images as buttons in my case I'm actually going to just create UI buttons that are
Change Wi-Fi default from unity
Somebody going pretty game object
Rewind button
Right so now we have
This little B in here
Elysia
What's the scale of the size little bit ok so something like
This looks kid k
Angel nearest the Brighton
Text
Is very small you can barely see it there
Very small
All the text is actually a child of the button just increase the font size
There we go
Emmet habits a play
Furniture
And it's sized appropriately
And you don't want to be careful creating these buttons guys and there's a lot of things that I'm not going to cover in this tutorial
For example entering the text in
All of these various
Parameters associated with the text
But I think for now
This is a great
Place to start
For your demo just a very simple button
Ok so we have a play button here and I'm not going to copy this in create a quick button just yet
How much is going to test this out so let's save our main menu and hopefully so here is Albrighton in your notice
Actually has some effects associated with it when we click
That's because of the button
Component over here
Is just a few parameters we can change
So there's a pressed colour here we can make it you know
A vibrant pink colour
And there's a highlighter colour we can make it a day
You know it just a very sad pic see that
Actually really like those colours
Send a copy this component in play mode here so if we exit play Mode all of these colours are going to go back to them to 4
So that's fine a copy that can Pony
And I'll pissed
Does values
Now
We have that button
Enable turn pink when you select
So I really like that
I'm also going to change the colour of the text as well so I think I wanted to be
This purple colour I really like that
Now before I copy this button and create a quick button from it
I actually wanted to
Work properly and then just make a prefab at a bit so I can use it over and over again
So in order for it to work properly
We actually need to create a script in it's a very simple Script so don't panic all it's called is menu
Handle
Ok in the menu handler is going to do two things it's been a load of seen or is going to enable us
The demo ok
Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1
Has got a headache reading the Script
I'm just going to create a c-sharp script in Kali
Menu handler
Once that's created
Open it up
All we got to do is basically create a script that allows buttons to have
Two functions and that's quick game and then load scene
Self read aloud seen we need to be able to specify
Which scene we're going to load right so we got to do is create a new serialise private field
And it's gonna be a private string
Ennis going to be
Which scene
So we can specify which seem we want a load
Ok
Animals going to create two functions very simple functions
First woman to create a public function
Ennis going to be cold quit game
And if you guys ever forget how to quit your application and I'll promise you this I forget this all
Time so I'm actually referencing right now to my right
What is function is called by just make you feel better I forget these functions all the time so in order to
Your application
All you say is application that quit
Very simple back
My memory is terrible and I will forget that so always be ready to jump on Google and look at how
I quit my application but in my case I had to my right here and that's what it's called application quit
We also need to create a new function
Public void
Is there a called loadscene
When are we going to do here is seen manager
Dart
Load scene and then we're going to putting the prime minister which team
So
Why am I getting an error here or southern sea
The name c manager does not exist in the current context
What's take a look at that show potential fixes
Looks like we need
Put this at the top here which is
Using unityengine scene management
So now you can see
Without of the Script up here in that allows us
To use a lot of functions associated with seen management
The unity has out of the box
So there's a two functions here now getting guys when you're writing scripts
And you're not
Putting cold inside of the update or the start function
You creating functions that need to be fired from somewhere right now they're not being fired anyway
Nobody is firing these so we actually need to tell the buttons to fire these functions
The first function we want to fire is the loadscene function
Search John back in the unity the first thing we want to do is actually just put that menu handler
Somewhere ok
We can actually access the Script if it's not somewhere in our singer
Tell me an actually put it just inside of a canvas
You can really put it anywhere you want but I'm going to put it into the canvas
Now when I select my button here
I can actually go to the button
In look at this
We have this call Lidl on click
Section of the button
This is another way Forest add events
2 this is sort of what you need to give us out of a box for this very specific component button
You could write your own script called button and then create all of this functionality
From scratch if you wanted to that's actually totally fine and I've done that before
But you need is created it for us already
So let's just go ahead and use what they've given us
Summer goddess on collection down here and then click the + icon
Look we can drag an object in the slow field here
Nnl find various functions associated with scripts on that object
It's very cool
So scary drag the canvas
To this
Sea of here
In love with a dropdown with various functions we can use
There's a menu handler script
And now look we can say it load scene
So the only thing left we need to do is basically tell the canvas
Tell them you have her
What scene download
Well let's just type in the scene which is
Level one
Never wanted to go to a cutscene we could type in
The sea name for a cutscene
If we wanted to go to
Another scene other than the first level maybe a saved level we can access that saves level from the menu Hale
Write a script for that
Play narcos to keep it simple we're just gonna go straight to level one
What's a that intestinal
So let's go ahead and try and hit play and see what happens
Perfect
Now if it takes a while to load a scene
Just remember that it's gonna be a lot faster when you actually create a stand-alone build
To play a game
Outside of the unity editor
Being inside of Unity editor always slows things down significantly
Now we're not going to create a loading
Bar work some kind of animated GIF of the player running and then have some text that says low
Or anything like that for this demo that's for you to do when you're creating your game at the Polish your game
But in our case this levels actually gonna load pretty quick because it's not a huge level
I'm fine not creating a loading bar for the purposes of this story or demo
Ok so that button works great so instead of just copying this and pasting it
Do you want to be careful remember any time you going to paste
A game object over and over again in use it be sure to make a prefab out of it ok
How many go ahead in drag this
Into my prefabs folder
So that we can use this twice
Ok
So we're going to go
So we're going to go and copy this and paste
And I'm going to rename this to
Button
Quit
And I just make sure we need this one but play
Alright it's just change the text to
Quit
And then
It is easy as simply changing
From loadscene
2 quid game
Ok
NS&I saving
It's really that simple guys
Tesco head in hip play
So we can technically quit out of a game or an application inside the unity editor
Ok so quick quick
Nothing's going to happen
That's ok that's expected
But if we created a stand-alone application
It would actually quit out of the application
So that's gonna work great
Are two buttons work awesome
MHA what are we just make this menu really beautiful
By Simply adding
A song to the main menu ok
You may wonder do we want to use the audio trigger script
Walt no the audio trigger script is really meant for when the player is in the scene so when I
Rhyme into a new area I want new music to play
It's triggering with the player
On the main menu there's no reason to trigger anything we should just start playing the music
Right away
Actually very simple
So are we going to do is actually just drag a song we like
Just dragging into the scene that's really all you want to do here
Such as dragon
And
There we go on this just called this
Menu music if you go to the audio source that was created by the fall on this game magic
You can look at the various parameters here and take play on awake is set to true so that's good then start playing Runaway
The volume
Is that a 1
That looks like
Stop playing the music
When we play
And because we loaded into a new scene
It's going to
Go ahead and stop playing that music
Now there's a lot of things that we could do
To make this mean menu really shine
And I'm not going to lead into those things
Otherwise this tutorial could be 24-hours long there's just so many cool things we can do with this
But one thing that you can immediately add your menu to make it feel really special especially for you guys yes
Sing this to your Kickstarter backers or potential backers for as a demo
Are you sending sending it to publishers and you want them to a bully
Get invested in this game
What what are the things you can do with easily very easily just had a button sound effect ok
So when we click the button player sound
Now this is actually really easy
All you gotta do is actually just play a sound effect through something that has an audio source
Now in this case the menu music gameobject has an audio source and it's playing this song here
But we can also just finally sound effects through it at the same time it's like having a speaker
Playing a song well we could also play the sound of a click of Button click sound through
That speaker really rudimentary way of thinking about it but it works
So watch this has just clicked on her button play
I'm gonna go ahead and create a new click event
I'm gonna drag that menu music here
In a minute click
Are you source
Play one shot
That's going to allow us to play a sound effect
Go ahead and just drag a button sound effect something like that
A must do the same for quitting
Drag the menu music
Into a new event
Audio source play One Shot engine
Choose a sound effect
So now
Play here
Don't know this weekend
Or
So that is how
You can easily add sound effects to your main menu
It's really amazing how quickly you can make your main menu shut
A few other things you could do guys it's just create a very quick animation ok so good right hand
And I'm gonna go ahead and click create
For the animation window
Have you got the animation here let me go to UI
And I'm going to create a new animation I'm going to call this a main menu
Fade in
The record button
I'm in my seen tab here
Watch this is so cool
All I got to do is click on my logo here
Drag him to the left
NN at One S
Drive to the right like this
Guys we can do the same thing for the play button
The very beginning of the animation on start here
Equip
And then at 1 second
It will drag
Interframe like this so it play here and see on Fields
That's
Awesome
When we had a little bounce effect
Ok so maybe something like this
Doesn't make sense in the second watch this
Just suddenly bouncing the place
When my favourite thing to do is add some delay to various gameobject
So the logo comes in first
Then the play button comes in
And then equip button comes in
So
So they like this
It's so easy and so simple just make sure you got to be in America to have here
Make sure that Luke time
Is set a false Ibiza you select
You know the actual game object with animation on it so in this case is the canvas
Then I can double click on main menu fade in animation in sure be sure that Luke time is turned off
Play
There we go there's a menu
Very simple
Obviously you can change this and make it look as good as you want
Polisher
Have some fine change the fonts
But that is generally basically what I mean menuires
Now I want to make sure that I'm clear
Summit platforms don't have a mouse right
So really
Does more complexity of creating mean menus for other platforms
But in the case of steam you can you can get away with just using a mouse or you can create some functionality
Keyboard there's plenty of assets on the Asset Store to make sure that there's
A universal approach
To Hell your mean when you work personally if I know I'm going to make a game for Nintendo switch I make sure that
Use the vertical input
In the horizontal input don't use a mouse
So that means that play would be selected by default and I press space to play
Or if I want to get to the quick button I pressed down and then space there is some more complex functional
To creating a system like that but I'm not going to get into for these tutorials
But for steam for creating a steam game
Is totally fine they just use a mouse
NN1 final thing here guys
You want to make sure you got your build settings
And adding the main menu to your scenes in build
That's something I always forget to do so we're going to go to our sins here
Go to main menu
Drag up and
Now ready to go you want to make sure that they ordered properly ok
Main menu level 1 level 2 in Gemma hunter in a load by default
When you create
A build for this game
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.