Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:03,120 --> 00:00:07,440
In this video, I'm going to give you a quick introduction to the interface of unity, and we're going
2
00:00:07,440 --> 00:00:11,260
to throw together a fun little vehicle that I like to call a car.
3
00:00:11,260 --> 00:00:15,690
Not that it looks a lot like a car, but is kind of like a car and start the process of understanding
4
00:00:15,690 --> 00:00:19,440
how game objects and components work within unity.
5
00:00:19,800 --> 00:00:20,850
OK, let's get started.
6
00:00:21,210 --> 00:00:24,060
First thing to do is to finish off our installation process.
7
00:00:24,090 --> 00:00:26,400
I've got visual studio code that I've downloaded.
8
00:00:26,400 --> 00:00:31,500
I need to click on that to start the installation process as always, except all the agreements don't
9
00:00:31,500 --> 00:00:34,110
even read them because that's what our school kids do.
10
00:00:34,290 --> 00:00:38,670
Who knows what it is we're signing our life away to just go through the standard process.
11
00:00:38,670 --> 00:00:39,420
Click Yep, yep.
12
00:00:39,420 --> 00:00:40,440
Install, install.
13
00:00:40,440 --> 00:00:42,780
That'll start visual studio code installing.
14
00:00:42,900 --> 00:00:48,090
So we've got it there so that when we start up unity, we know how to point to visual studio code.
15
00:00:48,240 --> 00:00:50,340
You might just want to launch it to make sure it all works.
16
00:00:50,590 --> 00:00:52,010
OK, it looks like it does work.
17
00:00:52,020 --> 00:00:56,220
We'll come back to Visual Studio in a couple of lectures time, but for now we're going to move on and
18
00:00:56,220 --> 00:00:59,370
create ourselves a new project, jump over to a unity hub.
19
00:00:59,370 --> 00:01:01,860
If you don't have that open, then open up unity hub.
20
00:01:01,860 --> 00:01:06,750
You can see here my twenty twenty point one installation has successfully arrived.
21
00:01:06,870 --> 00:01:09,120
I'm going to click on Projects Top right.
22
00:01:09,120 --> 00:01:10,050
You'll see the new button.
23
00:01:10,050 --> 00:01:14,250
If you've got multiple versions of unity, you can click on the little, select the next one and choose
24
00:01:14,250 --> 00:01:17,040
which version you wish to start the project in.
25
00:01:17,040 --> 00:01:20,820
If you've only got one version of unity, then you can just click straight on the new button.
26
00:01:21,000 --> 00:01:22,830
So I'm going to choose twenty twenty point one.
27
00:01:23,010 --> 00:01:28,200
I've got a couple of templates we can select from we're making a quick little 3D project and I will
28
00:01:28,200 --> 00:01:30,660
rename this to be experimenting.
29
00:01:30,660 --> 00:01:31,680
Not something we're going to keep.
30
00:01:31,680 --> 00:01:33,540
We're just playing around in the engine for now.
31
00:01:33,630 --> 00:01:36,150
If you want to change the location, you can click the three dots.
32
00:01:36,150 --> 00:01:38,250
I'm going to jump back to repos.
33
00:01:38,250 --> 00:01:42,090
I'll actually create myself a new folder here, Unity 3D.
34
00:01:42,090 --> 00:01:47,190
I'll call this to reflect the factor in the unity three day course, double click on that and then select
35
00:01:47,190 --> 00:01:53,430
folder that will create my experimenting project within my repos unity 3D folder.
36
00:01:53,880 --> 00:01:56,130
Like I say, you can put it in whatever location you like.
37
00:01:56,130 --> 00:01:58,260
Just make sure you know where it is so you can find it later on.
38
00:01:58,410 --> 00:02:02,340
Click on Create and we're creating our first unity project.
39
00:02:02,610 --> 00:02:04,230
How to speed up through this portion.
40
00:02:04,230 --> 00:02:08,699
Sometimes it takes a little bit of time, particularly on the first time that you create a project.
41
00:02:08,850 --> 00:02:11,930
So be patient and then when it's done will be into unity.
42
00:02:12,120 --> 00:02:14,490
Now, what we see here is the default layout for unity.
43
00:02:14,490 --> 00:02:20,130
If yours doesn't look this way, you can jump up to window and then find layouts and click on default.
44
00:02:20,430 --> 00:02:21,450
That will change it back.
45
00:02:21,450 --> 00:02:23,100
Just maximize the screen again.
46
00:02:23,220 --> 00:02:25,020
That will change it back to the default layout.
47
00:02:25,020 --> 00:02:27,660
Now, there's a few main areas that I want to point out briefly.
48
00:02:27,780 --> 00:02:31,860
We've got on our left hierarchy, that's where all of our game objects will be shown.
49
00:02:31,860 --> 00:02:32,370
At the moment.
50
00:02:32,370 --> 00:02:37,620
We've got samples saying if we open samples, the little arrow select next to it and say we've got two
51
00:02:37,620 --> 00:02:40,820
game objects at the moment, the main camera and the directional light.
52
00:02:40,830 --> 00:02:44,880
Now, when I click on these in the hierarchy, it highlights them within our scene.
53
00:02:44,880 --> 00:02:48,600
You can see this tab just here is seen and we have our camera.
54
00:02:48,600 --> 00:02:52,500
And the other thing you'll notice when we click on each of these is our inspecter changes.
55
00:02:52,500 --> 00:02:57,720
The inspector is the place that gives us all the information about that particular game object, all
56
00:02:57,720 --> 00:03:02,430
the things that we can change and all the components that are on that game object.
57
00:03:02,430 --> 00:03:03,540
So this is a game object.
58
00:03:03,540 --> 00:03:05,520
The camera is a game object.
59
00:03:05,670 --> 00:03:10,470
It lives in our scene, represented in the hierarchy, and it has a number of components.
60
00:03:10,470 --> 00:03:15,060
Each time you see this little arrow that opens and closes, these are the different components.
61
00:03:15,060 --> 00:03:19,680
So if we close them all up so they're nice and tidy, transform camera and audio of this.
62
00:03:19,680 --> 00:03:22,050
Now, I said I was going to close them up, then I open them all up again.
63
00:03:22,080 --> 00:03:25,200
These are the components that make up the game camera.
64
00:03:25,320 --> 00:03:29,100
Now, every game object in our scene will have to transform.
65
00:03:29,100 --> 00:03:31,560
Transform is the position, the rotation and the scale.
66
00:03:31,560 --> 00:03:36,540
Basically, that's where it is in the world, which way it's rotated and how large it's scaled.
67
00:03:36,750 --> 00:03:40,230
If we click on the directional light, you can see that we've got transform once again.
68
00:03:40,230 --> 00:03:45,090
Everything has a transform the position rotation scale and it has a component which is light and light,
69
00:03:45,090 --> 00:03:49,920
has a whole bunch of information on there, for example, intensity, which is how bright our light
70
00:03:49,920 --> 00:03:51,330
is down in the bottom.
71
00:03:51,330 --> 00:03:53,790
You'll see we have the project tab.
72
00:03:53,790 --> 00:03:58,410
You might want to grab the middle the line down the middle and give yourself a little bit more real
73
00:03:58,410 --> 00:03:59,070
estate here.
74
00:03:59,190 --> 00:04:03,990
And if I click on my assets folder, you see I have a scenes folder within that click on scenes, you
75
00:04:03,990 --> 00:04:05,340
see a sample scene.
76
00:04:05,520 --> 00:04:09,360
That's the current scene that we've created the scene or the level or the world.
77
00:04:09,750 --> 00:04:12,240
We've only got one at the moment within our project.
78
00:04:12,240 --> 00:04:15,480
So sample scene up the top left, you'll see experimenting.
79
00:04:15,480 --> 00:04:17,850
That's the name of my project.
80
00:04:17,850 --> 00:04:19,019
I called it experimenting.
81
00:04:19,170 --> 00:04:24,120
Sample scene is the current scene that we're on and then you're seeing a little asterisks down the end
82
00:04:24,120 --> 00:04:25,530
that says it's not yet saved.
83
00:04:25,530 --> 00:04:29,730
If true control s or command -- got to file save click on that.
84
00:04:29,730 --> 00:04:31,200
You'll see the Asterix goes away.
85
00:04:31,380 --> 00:04:35,340
Now my scene has been saved to my hard drive.
86
00:04:35,460 --> 00:04:37,470
If we want to reinforce that, I'm just going to right.
87
00:04:37,470 --> 00:04:41,040
Click and find Sho in Explorer.
88
00:04:41,250 --> 00:04:48,120
When I do that it'll show me that currently within my repos unity three day experiment folders, I have
89
00:04:48,120 --> 00:04:48,990
the asset folder.
90
00:04:48,990 --> 00:04:49,920
There it is there within.
91
00:04:49,920 --> 00:04:51,030
That is the scenes folder.
92
00:04:51,030 --> 00:04:51,720
There it is there.
93
00:04:51,870 --> 00:04:58,200
And within this I have the sample scene that saved to my hard drive as a unity scene file.
94
00:04:58,320 --> 00:05:01,650
And because there's only a camera and a light in it, it's pretty small.
95
00:05:01,890 --> 00:05:02,630
And you'll see that a.
96
00:05:02,900 --> 00:05:08,180
Metter file has been created as well, that's just a file that unity creates to store extra information
97
00:05:08,190 --> 00:05:10,520
that it's not able to store in the same file.
98
00:05:11,030 --> 00:05:15,140
We're not going to do is add another thing to my scene, which make it slightly larger.
99
00:05:15,320 --> 00:05:16,160
So right.
100
00:05:16,160 --> 00:05:20,960
Click in the hierarchy and we can create a 3D object.
101
00:05:21,110 --> 00:05:25,340
Now we've got a few things here by default that we can create a cube, a sphere cylinder, etc..
102
00:05:25,520 --> 00:05:27,110
I want to start by creating a cube.
103
00:05:27,350 --> 00:05:32,890
When I do that, you'll see that cube appears in my hierarchy and it also appears within my scene.
104
00:05:33,050 --> 00:05:37,010
Now we can have a look at this and zoom around a little bit with your middle mouse button.
105
00:05:37,010 --> 00:05:39,320
You can pan around the world.
106
00:05:39,320 --> 00:05:44,240
If you hold down alt and left mouse button, you can rotate around.
107
00:05:44,450 --> 00:05:48,620
If you hold down just the right mouse button, you can look around from the spot we're in at the moment.
108
00:05:48,800 --> 00:05:50,300
You can mouse wheel in and out.
109
00:05:50,300 --> 00:05:55,270
You can also hold down alt and right mouse button to do a klingner zoom in and out.
110
00:05:55,370 --> 00:05:59,510
One thing that I use a WLOX, I find it really handy is if you're way off here and you're like, oh
111
00:05:59,510 --> 00:06:01,880
goodness me, I've clicked on my cube, where is the cube?
112
00:06:01,880 --> 00:06:06,020
In my saying, if you hit the F key, it will focus on that object.
113
00:06:06,140 --> 00:06:11,270
And then when you hold down alt and left mouse button and move your mouse around, it'll rotate around
114
00:06:11,270 --> 00:06:14,780
that exact object that you've just asked it to focus in on.
115
00:06:15,080 --> 00:06:15,760
Very handy.
116
00:06:15,800 --> 00:06:17,420
Now we can manipulate this cube.
117
00:06:17,420 --> 00:06:19,670
We can change it in a bunch of different ways.
118
00:06:19,670 --> 00:06:22,910
You see up in the top left, we have a number of icons.
119
00:06:22,970 --> 00:06:26,480
If we mouse over the one that's currently highlighted, it's the move tool.
120
00:06:26,480 --> 00:06:31,670
If I go to the next one is the rotate tool, the scale tool and the recht tool.
121
00:06:31,820 --> 00:06:34,370
These also correspond to keys on your keyboard.
122
00:06:34,370 --> 00:06:37,370
So cue for just general old hand tools.
123
00:06:37,370 --> 00:06:38,780
So that's moving around the world.
124
00:06:38,790 --> 00:06:42,560
W four move a, R and T.
125
00:06:42,710 --> 00:06:47,210
Generally I always use those keys on my keyboard for easy manipulation.
126
00:06:47,210 --> 00:06:49,850
It's very, very rare that I actually come up here and click them.
127
00:06:49,850 --> 00:06:54,260
So I recommend that you get used to t for changing things around.
128
00:06:54,260 --> 00:06:58,160
So if we hit W, you can see that we've got these handles on our game object.
129
00:06:58,160 --> 00:07:00,410
These handles relate to the coordinates.
130
00:07:00,410 --> 00:07:01,880
The Y is up.
131
00:07:01,880 --> 00:07:06,140
You see over in our top left corner you can see that Y is up and that's green.
132
00:07:06,470 --> 00:07:12,230
Red relates to the X and blue relates to the Z or the Z as I rotate around the world.
133
00:07:12,230 --> 00:07:17,330
So olt and left mouse button, you can see that it's rotating the widget up in the top right and it's
134
00:07:17,330 --> 00:07:17,960
also right.
135
00:07:17,960 --> 00:07:19,220
Rotating for the object.
136
00:07:19,310 --> 00:07:21,080
So let's do some manipulation for our object.
137
00:07:21,080 --> 00:07:23,300
I'm going to add R which will allow me to scale now.
138
00:07:23,300 --> 00:07:23,990
I can scale.
139
00:07:24,140 --> 00:07:30,800
If I mouse over the grey cube in the middle, it'll allow me to increase the entirety of my object.
140
00:07:31,040 --> 00:07:37,550
If I grab one of the handles for one of the axes that will allow me to change that particular axis,
141
00:07:37,550 --> 00:07:42,560
to stretch it or to scale it in that area, because I'm going to go about making a car, I think.
142
00:07:42,750 --> 00:07:44,180
OK, so this is the first stage of it.
143
00:07:44,180 --> 00:07:46,700
I've got one cube I can rename the cube.
144
00:07:46,700 --> 00:07:51,500
So by clicking on it once and then slowly clicking on it a second time, or I guess more accurately,
145
00:07:51,500 --> 00:07:54,620
click on it once, leaving a delay and then clicking on it a second time.
146
00:07:54,740 --> 00:07:57,020
I'll call this car body.
147
00:07:57,020 --> 00:07:59,570
I think I'll call this I've renamed my game object.
148
00:07:59,570 --> 00:08:02,600
And you can see over in the inspector, it's renamed Car Body.
149
00:08:02,600 --> 00:08:03,140
Excellent.
150
00:08:03,320 --> 00:08:05,150
And now I've got kabbadi selected.
151
00:08:05,150 --> 00:08:12,500
I'm going to hit Control D or Kamandi on the Mac and you see it will it will copy or duplicate car body.
152
00:08:12,500 --> 00:08:18,650
I could also go up to edit and find duplicate and you can see it shows us the hotkey next to it that
153
00:08:18,650 --> 00:08:20,450
is relevant for your system.
154
00:08:20,570 --> 00:08:23,510
Now where is it you might say we've got these two car bodies.
155
00:08:23,510 --> 00:08:25,880
Well, one is exactly over the top of the other one.
156
00:08:25,880 --> 00:08:31,880
So on car body one, if I hit W, then it changes to my move tool and I'll move that up in the air.
157
00:08:31,880 --> 00:08:36,470
You can see the second component of the car body let's hit ah.
158
00:08:36,620 --> 00:08:44,330
And then scale all of this down and then w move it back down on top of the car to create some sort of
159
00:08:44,330 --> 00:08:48,710
weird top of the car looking thing and just to show how the wreck transform works.
160
00:08:48,710 --> 00:08:55,190
I'm going to hit T and then that allows us to drag things on their individual sides rather than scaling
161
00:08:55,190 --> 00:08:55,850
the whole thing.
162
00:08:55,850 --> 00:09:00,260
So OK, back to you know what, I'll rename this part of the car body.
163
00:09:00,260 --> 00:09:02,330
I'll rename it by clicking on it twice.
164
00:09:02,780 --> 00:09:07,550
Car top now so that you're not just watching along and doing exactly what I do.
165
00:09:07,550 --> 00:09:11,840
I've got a challenge for you and a little bit of information I'll give you before the challenge is if
166
00:09:11,840 --> 00:09:12,380
you right.
167
00:09:12,380 --> 00:09:14,510
Click and find three object.
168
00:09:14,510 --> 00:09:17,210
There's a whole bunch of other things that we can add in here as well.
169
00:09:17,210 --> 00:09:21,200
For example, cylinders and capsules and spheres.
170
00:09:21,410 --> 00:09:23,420
So that's just a little hint for you for this challenge.
171
00:09:23,600 --> 00:09:28,580
And any time you see this green slide with the pause button, this means that we're doing a challenge.
172
00:09:28,820 --> 00:09:31,550
And I urge you to go through the challenges each time.
173
00:09:31,550 --> 00:09:35,960
So you're not just watching what I am doing, but you're actually doing and creating your own content.
174
00:09:36,200 --> 00:09:42,110
The challenge is using simple shapes experiment to make some sort of vehicles or could be a car, could
175
00:09:42,110 --> 00:09:44,540
be a tank or could be a rocket ship, whatever you like.
176
00:09:44,570 --> 00:09:45,440
OK, put the video on.
177
00:09:45,440 --> 00:09:46,610
Take on that challenge now.
178
00:09:48,090 --> 00:09:52,020
Radio, welcome back, I hope you took on that challenge, that's the really important part of this
179
00:09:52,020 --> 00:09:52,860
whole process.
180
00:09:53,190 --> 00:09:54,350
I'm going to look at my car here.
181
00:09:54,390 --> 00:09:57,330
I think it needs some wheels that make sense in my hierarchy.
182
00:09:57,330 --> 00:09:57,690
Right.
183
00:09:57,690 --> 00:10:00,120
Click find three object.
184
00:10:00,120 --> 00:10:02,000
I'll create a cylinder.
185
00:10:02,220 --> 00:10:05,040
Now, the cylinder is in the wrong direction and it's too large.
186
00:10:05,040 --> 00:10:09,870
I'm going to start by hitting ah and scaling down E for rotate.
187
00:10:09,870 --> 00:10:11,100
Why R isn't rotate.
188
00:10:11,100 --> 00:10:12,810
I don't know, but that's just the way it rolls.
189
00:10:12,810 --> 00:10:13,770
And a little tip.
190
00:10:13,770 --> 00:10:18,120
If you hold down control it will snap to every five degrees I believe that is.
191
00:10:18,120 --> 00:10:22,830
Or 15 degrees sorry as it's going around so I can get it nice and straight at the ninety degrees.
192
00:10:22,980 --> 00:10:28,470
Just another hint that over here on the side you can see the X rotation is now at ninety on the transform
193
00:10:28,650 --> 00:10:33,090
are going to hit W moved that out a little bit so I can see it as a little bit too large.
194
00:10:33,090 --> 00:10:34,260
So hit are.
195
00:10:35,640 --> 00:10:38,280
Make that bit smaller move moving into position.
196
00:10:38,330 --> 00:10:39,970
Ba ba ba ba ba boom.
197
00:10:39,990 --> 00:10:40,460
There we go.
198
00:10:40,470 --> 00:10:42,580
We've got a wheel on our car.
199
00:10:42,690 --> 00:10:48,660
Now, while I'm here, I'm going to click once, click twice, rename this from cylinder to wheel hit,
200
00:10:48,660 --> 00:10:52,770
enter and then control D to duplicate and you can see it says wheel.
201
00:10:52,950 --> 00:11:01,350
No one shows that it's our second wheel duplicate again that's control D Move it over and I'm just using
202
00:11:01,350 --> 00:11:06,060
ult and left mouse button to rotate around my vehicle here controlled again.
203
00:11:06,090 --> 00:11:12,000
This will give us our fourth wheel and it's good to get used to the fact that from a programming point
204
00:11:12,000 --> 00:11:15,030
of view we usually start at zero as the first item.
205
00:11:15,030 --> 00:11:15,690
So zero.
206
00:11:15,690 --> 00:11:18,270
And then you can see our next one's been named one to three.
207
00:11:18,420 --> 00:11:22,620
Just the way it works when we do programming, we have four wheels on our vehicle.
208
00:11:22,800 --> 00:11:27,360
I see that these two wheels are a little bit too close to the inside of the car.
209
00:11:27,360 --> 00:11:30,660
So what I'm going to do is click once and then find the second.
210
00:11:30,660 --> 00:11:35,310
We'll hold down, shift and click and now I can select both of them and move them both out a little
211
00:11:35,310 --> 00:11:36,210
bit, which I like.
212
00:11:36,480 --> 00:11:37,620
OK, pretty good for now.
213
00:11:37,620 --> 00:11:39,480
I'm just experimenting and playing around.
214
00:11:39,720 --> 00:11:45,240
The last thing I'll do is so that we can group these objects together so that we know that these one,
215
00:11:45,240 --> 00:11:48,000
two, three, four, five, six things belong to the car.
216
00:11:48,150 --> 00:11:50,070
I'm going to come into my hierarchy right.
217
00:11:50,070 --> 00:11:55,710
Click and create an empty that's an empty game object that has no visuals to go along with it.
218
00:11:55,710 --> 00:11:59,280
And if you have a look at our game object in the inspector, it's just the transform.
219
00:11:59,280 --> 00:12:01,560
There's no other components to tell it what it is.
220
00:12:01,710 --> 00:12:03,750
It's just a place in the world.
221
00:12:03,900 --> 00:12:06,540
And that's good because it's going to be a grouping object for us.
222
00:12:06,750 --> 00:12:09,540
Now, just out of practice, what I like to do over and transform.
223
00:12:09,540 --> 00:12:09,930
Right.
224
00:12:09,930 --> 00:12:14,760
Click and reset, that means that our position will be right in the very, very center of the world,
225
00:12:14,760 --> 00:12:18,540
which is zero zero zero on the X, Y, Z axis.
226
00:12:18,720 --> 00:12:20,160
Just a good habit to get into.
227
00:12:20,340 --> 00:12:22,170
Now I'm going to highlight.
228
00:12:22,170 --> 00:12:26,910
So click Carbury and then hold shift all the way down to the bottom part of my car, which is the wheel,
229
00:12:27,030 --> 00:12:33,030
and then drag this on top of game object and you can see they become indented the terminology here is
230
00:12:33,030 --> 00:12:40,620
the game object which I'll rename to Car is the parent and all the other objects underneath are the
231
00:12:40,620 --> 00:12:42,300
children that belong to the parent.
232
00:12:42,300 --> 00:12:48,030
So if I roll up car, you can see that by clicking on car at highlights everything within there.
233
00:12:48,180 --> 00:12:49,770
Also by clicking on car.
234
00:12:49,920 --> 00:12:55,320
I can move everything around at once and I don't have to go and highlight the individual aspects of
235
00:12:55,320 --> 00:12:55,440
it.
236
00:12:55,440 --> 00:13:00,300
So that's just a way for us to start grouping our game objects into a parent game object.
237
00:13:00,570 --> 00:13:04,830
OK, that's all for this lecture in the next lecture will get a little bit more detailed with playing
238
00:13:04,830 --> 00:13:07,410
around with prefabs and understanding how they work.
239
00:13:07,500 --> 00:13:08,550
I'll see you in the next lecture.
23687
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.