WEBVTT

00:00.040 --> 00:02.920
We need to hook this button with some certain function.

00:02.920 --> 00:06.920
So we will use the scene management script as we created before.

00:07.520 --> 00:11.720
But before we do, let's move over to this sample scene by double clicking on it.

00:12.720 --> 00:18.360
Because we have the Scene Management GameObject underneath our uh, sample scene, we can see in the

00:18.360 --> 00:19.000
hierarchy.

00:19.240 --> 00:21.160
So we need to make this one prefab.

00:21.160 --> 00:22.360
So we're going to have the copy.

00:22.360 --> 00:28.480
And then we can use uh because we have this scene management script is attached to scene management

00:28.520 --> 00:31.360
game object as you can see in the inspector.

00:31.360 --> 00:33.000
So we will make this one prefab.

00:33.000 --> 00:36.520
And then we're going to use it in our scene as well.

00:36.520 --> 00:39.960
So we're going to use the scene management script one more time.

00:39.960 --> 00:43.640
So we don't need to create another script to manage the scene.

00:43.640 --> 00:48.560
So let's select the Scene Management GameObject in the hierarchy, and let's drag it over to this prefabs

00:48.560 --> 00:50.840
folder in order to make it prefab.

00:50.880 --> 00:53.560
And now we're gonna move over to our scene.

00:53.560 --> 00:55.480
So let's head over to this scenes folder.

00:55.480 --> 00:59.750
Let's double click on this scene and we will click on this save button.

00:59.910 --> 01:04.750
Uh, so basically, whatever changes we made inside this sample scene, it's going to be saved.

01:04.750 --> 01:06.550
And I really want to save that.

01:06.550 --> 01:08.550
So that's why I'm going to click on this save.

01:08.710 --> 01:14.550
And as soon as we click save we can see we just moved over to this scene.

01:14.590 --> 01:19.710
And now I'm gonna move over to my project tab assets and then prefabs folder one more time.

01:19.990 --> 01:23.390
And I have the scene Management game object over here.

01:23.390 --> 01:27.870
So let's select that game object or that prefab of that scene management game object.

01:27.870 --> 01:32.230
And we will drag it in this hierarchy in order to use it one more time.

01:32.230 --> 01:36.670
And we can see we have the scene Management GameObject in the hierarchy.

01:36.670 --> 01:41.430
And inside this scene management game object, we can see we have the scene management script.

01:41.430 --> 01:43.590
So let's open that scene management script.

01:43.590 --> 01:45.870
But before we do let me explain.

01:45.870 --> 01:49.390
So once we click on this play button we want to play our game.

01:49.390 --> 01:54.750
And once we click on this abort button then we just want to move over to about a menu.

01:54.750 --> 01:59.870
And once we click on this exit button then we're going to quit our application or the game.

01:59.870 --> 02:01.270
We just want to exit.

02:01.270 --> 02:07.550
So let's double, double click on this scene management script and we will make, uh, more function

02:07.550 --> 02:11.470
one for our, uh, play button and one for our exit button.

02:11.470 --> 02:14.830
And we will talk about that about button later on.

02:15.110 --> 02:21.310
And I'm gonna move over to my top of our class, and we will make the function over here, and we will

02:21.310 --> 02:27.110
make that function public because we're going to call this function uh, from click event means whenever

02:27.110 --> 02:28.990
we're going to click on that play button.

02:28.990 --> 02:30.870
And then we will call the play function.

02:30.870 --> 02:33.870
So let's make a function of for our play button.

02:34.030 --> 02:35.790
And let's make that one public.

02:35.790 --> 02:37.510
For function we will type for it.

02:37.510 --> 02:39.110
And we have to name the function.

02:39.110 --> 02:44.350
I'm going to say something like play game and let's make first bracket and some curly brackets.

02:44.350 --> 02:50.190
And what we want to do inside this function, we just really want to load up the scene, uh, load up

02:50.190 --> 02:54.270
the scene or the sample scene or which scene we are playing our game.

02:54.510 --> 03:01.260
So we will use this in manager dot load scene function in order to load up the scene and make sure you

03:01.260 --> 03:07.220
just go to top of your class before you use this function, include this namespace called using Unity

03:07.260 --> 03:09.500
Engine dot Scene Management.

03:09.500 --> 03:15.780
It's going to allow us, in order to use this scene manager dot seed function in order to load our scene.

03:15.780 --> 03:22.020
And inside this load scene in this brackets, we need to pass in quotation the name of the scene, or

03:22.020 --> 03:24.620
you can simply pass the bill index of it.

03:24.620 --> 03:30.100
So, uh, in this play game function, we just load up the scene that in which scene we are playing

03:30.100 --> 03:30.820
our game.

03:30.820 --> 03:36.100
And we do know the name of the scene is sample scene, in which scene we just playing our game.

03:36.100 --> 03:40.580
And if you just want to take a look of it then just move over to unity.

03:40.580 --> 03:42.260
In the top left you can see file.

03:42.260 --> 03:45.300
So just click there and then click on this Build Profiles.

03:45.460 --> 03:48.220
And you can see the name of the scene over here.

03:48.220 --> 03:51.540
And uh so basically you will be in windows.

03:51.540 --> 03:57.380
Then click on this open scene list over here, and as soon as we click, we can see the name of the

03:57.380 --> 04:00.540
scene is a left side, which is sample scene and the build index.

04:00.540 --> 04:02.860
We can see in the right side which is zero.

04:02.860 --> 04:07.540
So we can simply pass the build index of this scene as well as name of the scene.

04:07.540 --> 04:12.620
So I'm going to pass my name of the scene which is sample scene or in which scene you were playing our

04:12.620 --> 04:13.020
game.

04:13.260 --> 04:19.020
Or you can check that by going over to this project tab, then assets and then since folder or where

04:19.020 --> 04:19.940
you have the scene.

04:19.940 --> 04:25.820
So if I just double click on this sample scene, we can see in this sample scene we are playing our

04:25.820 --> 04:26.140
game.

04:26.140 --> 04:28.460
And you can take a look on that as well.

04:28.500 --> 04:30.660
By moving over to this hierarchy.

04:30.660 --> 04:34.620
And in hierarchy you can see the name of the scene is Sample Scene.

04:34.620 --> 04:37.100
So I'm going to move over to my scene once again.

04:37.540 --> 04:40.260
So the name of the scene in quotation we're going to pass.

04:40.260 --> 04:42.340
So the name of the scene is sample scene.

04:42.340 --> 04:44.700
So let's pass name of the scene.

04:44.700 --> 04:48.700
So in our case sample scene sample scene.

04:48.700 --> 04:50.740
And let's close that up semicolon.

04:50.740 --> 04:54.330
Or you can simply pass without coercion the index of it.

04:54.330 --> 04:56.210
So the build index was zero.

04:56.370 --> 04:59.130
So you can pass the build index as well.

04:59.130 --> 05:00.610
But I'm not gonna do that.

05:00.610 --> 05:03.450
And let's press down Ctrl s to save our script.

05:03.450 --> 05:05.130
And let's move over to unity.

05:05.250 --> 05:07.370
And we will choose our play button.

05:07.370 --> 05:12.570
So whenever I am gonna click on this play button then I will call that play game function.

05:12.610 --> 05:15.290
And what that play game function is doing.

05:15.290 --> 05:19.570
It's basically loading up the scene in which scene we are playing our game.

05:19.570 --> 05:21.690
So just let's have a look on this.

05:21.690 --> 05:24.210
So just wait for to compile our script.

05:24.210 --> 05:26.850
And once it's done we are ready to do that.

05:26.850 --> 05:31.570
So let's go over to this hierarchy then canvas and we will move over to mano.

05:31.570 --> 05:33.570
And then let's choose this play button.

05:33.850 --> 05:37.810
So let's choose the play button underneath your menu GameObject in the hierarchy.

05:37.850 --> 05:43.970
Then go over to Inspector, scroll down to this button component and we can see on click and it says

05:43.970 --> 05:45.130
list is empty.

05:45.130 --> 05:47.330
So over here we can call the function.

05:47.330 --> 05:50.850
And in order to call the function we need to click on this plus icon.

05:50.850 --> 05:56.850
And over here we need to drag the game object in which game object the script is sitting on or attached.

05:56.850 --> 06:01.650
So in our case this scene management game object the scene management script is attached.

06:01.650 --> 06:06.010
So we will select our scene managed game Management game object in the hierarchy.

06:06.010 --> 06:08.210
And let's drag it over to that slot.

06:08.210 --> 06:09.570
And it says no function.

06:09.570 --> 06:13.330
So just click there and we do no inside the scene Management game object.

06:13.330 --> 06:15.330
The scene management script is attached.

06:15.330 --> 06:18.930
And we can see in the bottom which is scene management script.

06:18.930 --> 06:22.410
So we're just moving over to this scene management class.

06:22.410 --> 06:23.530
And over there we.

06:23.770 --> 06:26.410
We can see we just created the play game function.

06:26.410 --> 06:31.650
So we're going to choose this play game function means whenever we're going to click on this play button.

06:31.690 --> 06:36.330
And the this uh we just moving over to scene management game object first.

06:36.330 --> 06:41.370
And then from this scene management game object, we're just going over to the scene management script.

06:41.370 --> 06:45.970
And from this scene management script class we're calling the play game function.

06:45.970 --> 06:48.050
And what play game function is doing it.

06:48.120 --> 06:53.000
just loading up the scene in which scene we're playing our game and we can see the name of the scene

06:53.000 --> 06:54.320
is Sample Scene.

06:54.320 --> 06:55.760
So let's move to unity.

06:55.960 --> 06:58.440
And now let's click on this play button in the top.

06:58.480 --> 07:03.280
You will see as soon as we're going to click on this play button, the sample scene just gonna load

07:03.280 --> 07:07.000
up the or the scene in which scene which is playing our game.

07:07.000 --> 07:09.440
And you can rename the scene as well.

07:09.760 --> 07:16.760
So if I just click on this play button and as soon as we click on play button, we can see we just loaded

07:17.000 --> 07:22.440
loaded up the sample, uh sorry, sample scene or which scene we just playing our game.

07:22.440 --> 07:28.080
And if I just click on this menu button, we're not loading over or we're not getting over to Manos

07:28.080 --> 07:28.840
in yet.

07:28.880 --> 07:34.040
Basically once we click on this menu button, then we need to load up the scene as well.

07:34.040 --> 07:36.120
But we're going to take a look on that later.

07:36.120 --> 07:37.440
Let's get out of play mode.

07:37.480 --> 07:41.040
And let's uh, let's deal with this exit button now.

07:41.160 --> 07:45.840
So we will make a exit for uh, exit function for this exit button.

07:45.840 --> 07:49.360
So let's move over to script and I'm going to make it in the bottom.

07:49.360 --> 07:51.160
You can make it anywhere.

07:51.200 --> 07:53.000
It doesn't need to be in order.

07:53.000 --> 07:55.400
So we're going to make a public void.

07:55.560 --> 07:58.920
And let's call this function something like exit game.

07:59.200 --> 07:59.880
Exit game.

07:59.880 --> 08:02.720
Let's make first packet and some curly brackets.

08:02.720 --> 08:08.040
So inside this function what we're going to do we will use this application dot quit function.

08:08.040 --> 08:11.040
So make sure you just are doing as I did over here.

08:11.040 --> 08:13.040
Then close that up with semicolon.

08:13.040 --> 08:14.640
So what this function is just going to do.

08:14.640 --> 08:17.120
It's going to quit your application right away.

08:17.120 --> 08:20.400
But in unity editor it's not going to happen.

08:20.400 --> 08:23.560
It's not going to quit your application at all.

08:23.560 --> 08:29.880
But once you make the build or the game completely, then you just go ahead and then click on this exit

08:29.880 --> 08:30.480
button.

08:30.480 --> 08:36.560
Then it's gonna quit your application or the game, but it's not going to happen in unity editor.

08:36.560 --> 08:41.040
So if this function is perfectly working or not, we're going to check.

08:41.040 --> 08:46.870
So in order to check before we quit we're going to use this debug dot log function in order to print

08:46.870 --> 08:50.430
out the message in the console, and I'm going to say something like exit.

08:50.750 --> 08:56.390
Uh, so I just printing out this message, uh, for testing purposes, if it's perfectly working or

08:56.390 --> 08:58.350
not or correctly working or not.

08:58.390 --> 09:00.190
And let's close that up with semicolon.

09:00.190 --> 09:04.310
But it's not going to quit our application in unity editor.

09:04.310 --> 09:10.390
But once we meet our game totally or completely, then if we just click on that exit button, then it's

09:10.390 --> 09:15.990
gonna quit our application or the game and let's press down Ctrl S to save our script and let's move

09:15.990 --> 09:16.830
to unity.

09:16.830 --> 09:20.710
So we need to choose our exit game function for this exit button.

09:20.710 --> 09:26.510
So whenever we're gonna click on this exit button and that exit game function just gonna call.

09:26.510 --> 09:29.270
And we don't know what we have done inside that button.

09:29.270 --> 09:31.390
We just quitting our application.

09:31.390 --> 09:35.190
So let's go to Nano Game Object and let's choose the exit button.

09:35.230 --> 09:36.390
Let's go to Inspector.

09:36.390 --> 09:41.030
Scroll down to this button component and let's click on this plus icon.

09:41.030 --> 09:45.190
So we need to drag the game object in which game object the script is sitting on.

09:45.190 --> 09:47.550
So the script is sitting on this scene management.

09:47.550 --> 09:49.150
So we're going to drag right there.

09:49.150 --> 09:51.230
Let's click on this no function.

09:51.230 --> 09:54.950
Let's go to scene Management Script or Scene Management C class.

09:54.950 --> 09:58.910
And we're going to choose this exit game function for this exit button.

09:59.070 --> 10:01.550
And now let's click on this play button in the top.

10:01.750 --> 10:02.630
Uh in the top.

10:02.630 --> 10:09.270
And we will choose our console because we just printing out message and we want to see our message underneath

10:09.270 --> 10:10.590
our console tab.

10:11.310 --> 10:13.190
So let's uh select the console.

10:13.510 --> 10:16.710
And if I just go ahead and then click on this exit button.

10:16.710 --> 10:22.750
As you can see as soon as we're clicking the message in the console says exit because that exit game

10:22.750 --> 10:24.270
function is just calling.

10:24.310 --> 10:30.190
And what exit function is just doing its exit game function, it just printing out the message in the

10:30.190 --> 10:31.150
console exit.

10:31.150 --> 10:33.910
And after that it's just coding our application.

10:33.910 --> 10:39.590
And we can see that we're not quitting our application at all in unity editor.

10:39.590 --> 10:45.580
But you once you make the game completely or the build, then you can just go, go ahead and it's gonna

10:45.580 --> 10:50.540
quit your application right away once you click on this exit button.

10:50.540 --> 10:54.700
So now let's head, uh, let's talk about our mano button now.

10:54.700 --> 11:01.380
So let's get out of play mode and let's go to our project tab then since, uh sorry, this assets folder.

11:01.380 --> 11:03.380
And let's move over to these scenes now.

11:03.380 --> 11:07.060
And let's double click on the sample scene and let's click on this shape.

11:07.420 --> 11:14.380
Uh, so what we need to do we need to once we dying and clicking on that menu button, we can see with

11:14.380 --> 11:18.020
that we have seen that we not moving over to mano scene.

11:18.020 --> 11:22.220
So once we click on that mano button, we just want to load up the mano scene.

11:22.380 --> 11:26.580
So we need to and we just printing out the message in the console says mano.

11:26.580 --> 11:31.820
So let me show you, if I just click on this play button and then this player game object just loses

11:31.820 --> 11:35.940
all of his self, you will see the game over you by just going to be activate.

11:35.940 --> 11:41.580
And once we click on that mano we're not loading up the menu as at all.

11:41.940 --> 11:43.620
So let's have a look on that.

11:45.020 --> 11:47.540
Let's take damage from this enemy game object.

11:47.540 --> 11:54.740
And if I just click on this menu button by now we can see a we just printing out a message in the console

11:54.740 --> 11:56.100
says load menu.

11:56.100 --> 12:02.420
And instead of printing out message we really want to load up the menu instead of printing out message.

12:02.420 --> 12:04.460
So let's get out of play mode.

12:04.700 --> 12:10.180
And before you load up the menu scene, make sure you just go to top left file and then build profiles

12:10.180 --> 12:11.100
in the bottom.

12:11.100 --> 12:15.140
And then click on this open scene list and move over to the scene list.

12:15.300 --> 12:17.500
And over here what you need to do.

12:17.540 --> 12:20.260
You need to drag all of the scenes that you have.

12:20.260 --> 12:26.060
So we want to load up the menu scene and we can not able to see our scene in this scene list.

12:26.060 --> 12:30.340
So what we have to do, we need to drag our menu scene into this list.

12:30.340 --> 12:34.700
So we will move over to our project tab, then assets and then since folder.

12:34.700 --> 12:40.930
Because in that since since folder, we just created our scene and we can see it over here.

12:40.930 --> 12:46.370
So what we need to do, we need to select our scene, then drag it over to this scene list in this,

12:46.610 --> 12:53.210
uh, over here, in this scene list, make sure all of the scenes are in this inside this scene.

12:53.450 --> 12:56.970
If it's not, then select them and drag it over here.

12:56.970 --> 12:59.210
And I'm going to drag this scene in the top.

12:59.210 --> 12:59.530
Why?

12:59.570 --> 13:02.650
Because I want this scene to be the default one.

13:02.690 --> 13:04.690
Or once our play player games.

13:04.810 --> 13:07.370
Uh, player just start our game.

13:07.410 --> 13:09.770
I want this menu to be the default one.

13:09.770 --> 13:14.970
So that's why I just drag it, this menu in the top, and then these samples in the down.

13:15.170 --> 13:18.010
And by now we have both of this scene.

13:18.050 --> 13:22.730
We have this menu as well as as well as we have the sample scene.

13:22.730 --> 13:28.610
So let's get the cut this tab and let's uh move over to our menu function where we just printing out

13:28.610 --> 13:29.250
message.

13:29.250 --> 13:32.730
So in our case we're doing inside this scene management script.

13:32.730 --> 13:36.010
So we're going to select our Scene Management GameObject object in the hierarchy.

13:36.130 --> 13:39.610
And let's open up the scene management script by double clicking on it.

13:39.610 --> 13:45.850
And we can see over here we're just printing printing out in the printing out the message in the console

13:45.850 --> 13:46.930
says load menu.

13:46.930 --> 13:53.290
And you can notice over here and after printing out message we also want to load up the menu scene.

13:53.290 --> 13:58.210
So what we need to do we need to use this scene manager function in order to load that up.

13:58.210 --> 14:00.810
So we're going to use this scene manager dot load scene.

14:00.810 --> 14:03.210
And we do know this over here load scene.

14:03.250 --> 14:07.090
It's going to take the scene name in quotation or the build index of it.

14:07.090 --> 14:10.130
And if you just want to see that then move over to unity.

14:10.170 --> 14:16.530
Go to top left file, then build profiles and then scene list so we can see the name of the scene is

14:16.530 --> 14:20.890
nano and the build index of it we can see in the right which is zero.

14:20.890 --> 14:24.130
So we can simply pass the build index as well as the menu.

14:24.130 --> 14:29.370
So I'm going to pass the name of the scene instead of the build index, and make sure the scene is in

14:29.370 --> 14:30.930
this scene inside the scene list.

14:30.930 --> 14:34.120
If it's not then drag them as we have done.

14:34.120 --> 14:35.680
So I'm going to cut this step by now.

14:35.680 --> 14:36.880
Let's go to script.

14:37.040 --> 14:39.800
And in we're going to make a quotation.

14:39.800 --> 14:41.560
And let's pass the name of the scene.

14:41.560 --> 14:44.240
Or you can simply pass the index which is zero.

14:44.240 --> 14:46.440
And let's close that up with semicolon.

14:46.440 --> 14:50.240
But instead of passing bill index I'm going to pass the scene name.

14:50.240 --> 14:52.360
So I'm going to do inside this quotation.

14:52.360 --> 14:54.200
So the name of the scene is mano.

14:54.200 --> 14:57.280
And let's press down Ctrl S to save our script.

14:57.280 --> 14:59.280
And let's move to unity by now.

14:59.280 --> 15:01.200
And let's have a look on this.

15:05.200 --> 15:06.600
So just wait for to compile.

15:06.600 --> 15:09.200
And once it's done we are ready to do that.

15:09.840 --> 15:11.560
So I'm going to clear my console.

15:11.560 --> 15:15.280
Let's click on this play button in the top and have a look on it.

15:18.400 --> 15:18.960
How about.

15:27.280 --> 15:27.640
It.

15:27.840 --> 15:29.040
So just wait.

15:29.040 --> 15:30.400
We're going to take damage.

15:31.000 --> 15:32.280
So let's take damage.

15:32.280 --> 15:35.600
And now if I just go ahead and then click on this menu button.

15:35.960 --> 15:41.400
And as soon as we click on that menu button, we can see we just headed over to our mano scene.

15:41.400 --> 15:45.160
And we can just click on this play button in order to play our game.

15:45.160 --> 15:48.760
And we can take a look on on this once again.

15:48.760 --> 15:50.520
So let's have a look on it.

15:50.760 --> 15:51.960
So I'm going to take damage.

15:51.960 --> 15:53.720
And let's click on this menu button.

15:53.920 --> 15:59.880
And as soon as we click on that menu button we just head it over to our mano scene once again.

15:59.880 --> 16:00.920
So this is the cool thing.

16:00.920 --> 16:02.320
I hope you get the idea.

16:02.320 --> 16:05.080
And now let's talk about our about button.

16:05.080 --> 16:11.240
So I'm gonna get out of play mode and let's head over to our scenes are seen in order to do that.

16:11.240 --> 16:17.080
So I'm going to move over to my move over to my project tab and then assets and then scenes folder.

16:17.080 --> 16:21.320
And let's double click on this mano scene in order to move over to that scene.

16:21.360 --> 16:23.560
And let's talk about this about button.

16:23.560 --> 16:26.680
So I'm going to move over to my hierarchy then canvas.

16:26.840 --> 16:30.270
And let's select this mano and then this about button.

16:30.270 --> 16:35.390
So once we click on this about button then I just want to disable this menu UI.

16:35.590 --> 16:39.790
And I want to activate this about menu about menu UI.

16:39.950 --> 16:42.030
So once we click on this about button.

16:42.030 --> 16:47.150
So we will choose our about button underneath our menu GameObject in the hierarchy.

16:47.190 --> 16:48.230
Let's go to Inspector.

16:48.230 --> 16:50.270
Scroll down to this button component.

16:50.270 --> 16:54.030
And we can just click on this plus icon in order to do a action.

16:54.190 --> 16:55.830
And the action I want to do.

16:55.870 --> 17:02.390
Basically, I just want to deactivate this menu itself, and I want to activate this menu about menu.

17:02.670 --> 17:04.950
And once I click on this about button.

17:04.950 --> 17:06.910
So you need to drag the game object.

17:07.270 --> 17:10.910
Which game object just you want to activate or deactivate.

17:10.910 --> 17:13.830
So in my case I just want to deactivate this menu.

17:13.830 --> 17:16.030
So I'm going to select my menu Game Object itself.

17:16.030 --> 17:18.150
And let's drag it over to that slot.

17:18.150 --> 17:19.430
And it says no function.

17:19.430 --> 17:20.590
So just click there.

17:20.590 --> 17:22.590
And over here you can see game object.

17:22.590 --> 17:25.910
So game object basically just referencing itself hole.

17:26.070 --> 17:30.310
And we will choose the bottom in the we can see said active and it says bull.

17:30.430 --> 17:34.950
So if you just take their check, check basically means you just enabling it.

17:34.950 --> 17:39.510
But I want to disable this menu once I click on this about button.

17:39.510 --> 17:40.510
So I'm gonna disable.

17:40.590 --> 17:45.190
To disable we just have to uncheck and we're going to click on this plus icon because we're going to

17:45.190 --> 17:46.470
do one more action.

17:46.470 --> 17:54.470
And the action I wanted to I want to I want basically to do is that we want to activate our about menu.

17:54.510 --> 18:01.390
Once we click on this about button about button, then I want to disable the menu and I want to activate

18:01.390 --> 18:02.550
the about menu.

18:02.710 --> 18:08.790
So over here over here we need to drag the game object or which game object just you want to activate

18:08.790 --> 18:10.270
as a second parameter.

18:10.270 --> 18:12.150
So as a second thing.

18:12.150 --> 18:14.150
So we're going to activate our about menu.

18:14.150 --> 18:16.590
So we will select our about menu game object.

18:16.590 --> 18:18.590
And let's drag it into that slot.

18:18.590 --> 18:20.510
And we will click on this no function.

18:20.510 --> 18:24.270
We will go to game object basically means it just referencing itself.

18:24.270 --> 18:29.340
And we're going to use this set active bool function in the bottom and we're going to check it.

18:29.340 --> 18:29.580
Check.

18:29.580 --> 18:33.380
It basically means we're just activating that and let's have a look on it.

18:33.380 --> 18:38.580
So basically whenever we're going to click on this about button at the menu just gonna be deactivate.

18:38.580 --> 18:40.460
Basically gonna disable.

18:40.500 --> 18:42.780
And that's why we just leave it unchecked.

18:42.780 --> 18:45.860
And we just activating this about menu means about menu.

18:45.860 --> 18:49.860
Just gonna be activate as soon as we click on this about button.

18:49.860 --> 18:51.180
So let's have a look on it.

18:51.180 --> 18:54.580
So I'm going to click on this play button in order to play our game.

18:54.580 --> 18:56.700
And we're going to take a look on it.

18:56.700 --> 19:02.060
So as soon as we're going to click on this about button you will see this menu just gonna be deactivate.

19:02.060 --> 19:04.980
And that about menu just gonna be activate right away.

19:04.980 --> 19:05.860
So let's have a look.

19:05.860 --> 19:11.300
So if I just click on this about button, as you can see, as soon as we click about button we can see

19:11.300 --> 19:13.380
this about menu just gets activate.

19:13.380 --> 19:18.540
And that menu uh about about menu you may just get deactivate.

19:18.540 --> 19:23.180
And we can see underneath our canvas GameObject in the hierarchy as well.

19:23.180 --> 19:26.620
So the menu we can see, it just gets unchecked in the inspector.

19:26.620 --> 19:27.740
And this about button.

19:27.780 --> 19:32.580
About menu just gets a check in inspector means we just activating.

19:32.820 --> 19:39.340
And once we click on this back button then what I want to do I want to activate one more time the menu.

19:39.340 --> 19:42.420
And I just want to deactivate this about menu.

19:42.580 --> 19:44.020
So let's get out of play mode.

19:44.020 --> 19:46.020
And now we're going to choose our back button.

19:46.020 --> 19:51.700
So whenever we're going to click on that button then back button and back button, then we're going

19:51.740 --> 19:53.420
to do all of those stuff.

19:53.540 --> 19:56.220
So let's move over to this about menu by now.

19:56.220 --> 19:59.380
And let's select the back button inside this about menu.

19:59.380 --> 20:00.820
So let's select the back button.

20:00.860 --> 20:02.100
Go over to Inspector.

20:02.140 --> 20:05.820
Scroll down to Button Component and we're going to click on this plus icon.

20:05.820 --> 20:11.100
So we need to drag the game object which which game object we want to activate or deactivate.

20:11.100 --> 20:13.060
So in my case I'm going to select my menu.

20:13.060 --> 20:14.780
And let's drag it right there.

20:14.780 --> 20:17.100
And we will go to no function then Game Object.

20:17.100 --> 20:19.660
And we're going to use this set act set bool.

20:19.660 --> 20:25.690
And I'm going to check this because I just want to, uh, activate this about a new UI.

20:25.730 --> 20:27.770
Once we click on that back button.

20:27.770 --> 20:30.810
And after that, I want to deactivate the about menu.

20:30.810 --> 20:33.290
So we're going to click on this plus icon one more time.

20:33.290 --> 20:38.010
And we can just drag the game object which game object we want to disable or enable.

20:38.010 --> 20:40.090
So I'm going to select my about menu itself.

20:40.090 --> 20:42.570
Let's select that and drag it over to this slot.

20:42.770 --> 20:46.250
And we're going to click on this no function game object and set active.

20:46.250 --> 20:51.010
And I'm going to uncheck means we just disabling or disabling our about menu.

20:51.210 --> 20:56.370
As soon as we click on that back button and we're just enabling our menu UI.

20:56.410 --> 21:00.290
You can see in the inspector on click event as you can see.

21:00.290 --> 21:02.370
So I hope you get the idea of this.

21:02.370 --> 21:04.210
And let's uh, let's test it.

21:04.210 --> 21:07.130
So I'm going to click on this play button to play our game.

21:07.130 --> 21:10.250
And we will test uh about this about button.

21:10.250 --> 21:14.170
So as soon as we're going to click on this about button you will see the menu UI.

21:14.210 --> 21:16.090
Just gonna be uh disable.

21:16.090 --> 21:18.410
And the about menu is just going to be activate.

21:18.410 --> 21:20.290
So let's click on this about button.

21:20.330 --> 21:26.650
and we can see as soon as we click on that about button, we can see that this about menu just gets

21:26.690 --> 21:30.010
activate and that menu UI just gets deactivate.

21:30.010 --> 21:35.730
And now if I just click on this back button and we can see as soon as we click on that back button,

21:35.770 --> 21:39.330
we, we can see that this menu just gets activate.

21:39.330 --> 21:42.970
And that about menu gets deactivate or disable.

21:42.970 --> 21:50.010
So basically that this is the thing that how you can use a button to do specific things or the things

21:50.010 --> 21:51.690
that you really want to do.

21:52.130 --> 21:57.930
A this is a pretty short way to do, and this seems pretty much cool to do it.

21:57.930 --> 22:02.730
I hope you get the idea that how you can do so I'm going to get out of play mode and let's select the

22:02.730 --> 22:03.770
parent game object.

22:03.770 --> 22:09.810
Let's go to overrides Apply all, and I'm going to do the same thing over with this about menu game

22:09.850 --> 22:10.970
object as well.

22:10.970 --> 22:13.010
Let's go to overrides apply all.

22:13.450 --> 22:14.490
And now it's saved.

22:14.490 --> 22:19.490
And I'm going to press down Ctrl s on my keyboard in order to save my project.
