1
00:00:00,000 --> 00:00:03,210
Hello and welcome back,

2
00:00:03,210 --> 00:00:05,220
my fellow game developers.

3
00:00:05,220 --> 00:00:07,350
In this video, we are simply

4
00:00:07,350 --> 00:00:09,870
going to be explaining
what Unity is,

5
00:00:09,870 --> 00:00:11,670
what Visual Studio is,

6
00:00:11,670 --> 00:00:13,800
how they communicate
with each other.

7
00:00:13,800 --> 00:00:15,930
And we'll explain
a little bit about

8
00:00:15,930 --> 00:00:19,790
the interface of both
these amazing tools.

9
00:00:19,785 --> 00:00:22,655
So first of all, what is unity?

10
00:00:22,650 --> 00:00:24,380
Let me put on my laser.

11
00:00:24,375 --> 00:00:26,855
So laser please. Okay.

12
00:00:26,850 --> 00:00:31,700
So unity is a cross-platform
game engine developer by,

13
00:00:31,695 --> 00:00:33,995
developed by Unity Technologies.

14
00:00:33,990 --> 00:00:36,590
So what do I mean
by cross-platform?

15
00:00:36,585 --> 00:00:39,095
Cross-platform means
that it can be used

16
00:00:39,090 --> 00:00:41,920
on different kinds of platforms.

17
00:00:41,920 --> 00:00:45,130
For example, unity, Windows and

18
00:00:45,125 --> 00:00:49,925
Mac OS will be using Unity
to develop our games.

19
00:00:49,925 --> 00:00:51,955
And we of course
going to be using

20
00:00:51,950 --> 00:00:54,430
this Unity engine right here.

21
00:00:54,425 --> 00:00:56,435
So before we move on,

22
00:00:56,435 --> 00:00:59,965
let me just show you the
interface of unity and we

23
00:00:59,960 --> 00:01:03,830
will move on to
explaining Visual Studio,

24
00:01:03,830 --> 00:01:06,010
and this is unity.

25
00:01:06,005 --> 00:01:08,675
Congratulations, you've
made it this far.

26
00:01:08,675 --> 00:01:09,905
So first of all,

27
00:01:09,905 --> 00:01:14,945
we have our toolbar right
here about everything.

28
00:01:14,945 --> 00:01:17,305
And this toolbar
provides access to

29
00:01:17,300 --> 00:01:19,730
the most essential
working features.

30
00:01:19,730 --> 00:01:23,060
On the left, we have
the basic tools for

31
00:01:23,060 --> 00:01:24,670
manipulating the scene view

32
00:01:24,665 --> 00:01:26,615
and the game objects within it.

33
00:01:26,615 --> 00:01:28,685
In the center we
have the play and

34
00:01:28,685 --> 00:01:31,685
pause and step
control right here,

35
00:01:31,685 --> 00:01:34,795
which allows us to play
our game, pause our game.

36
00:01:34,790 --> 00:01:38,840
And then we can also add
a step frame by frame.

37
00:01:38,840 --> 00:01:41,360
The buttons on the right
gives you access to unity,

38
00:01:41,360 --> 00:01:43,310
collaborate, and the Cloud

39
00:01:43,310 --> 00:01:45,460
which will not be using
and the accounts.

40
00:01:45,455 --> 00:01:49,115
We also have the layers
right here that we will be

41
00:01:49,115 --> 00:01:52,745
using a lot in this
course for our project.

42
00:01:52,745 --> 00:01:55,835
And we finally have the
layout and bi-layer.

43
00:01:55,835 --> 00:01:58,015
This is our layout right here.

44
00:01:58,010 --> 00:02:00,560
So we can change the
layout, for example,

45
00:02:00,560 --> 00:02:04,780
the two by three
or the four split.

46
00:02:04,775 --> 00:02:07,075
Or we can basically use

47
00:02:07,070 --> 00:02:09,560
the default and this is what
we are going to be using.

48
00:02:09,560 --> 00:02:11,810
So if you don't have
the same interface

49
00:02:11,810 --> 00:02:14,030
as me or different
kinds of layouts.

50
00:02:14,030 --> 00:02:16,360
Simply click on
here, go to default,

51
00:02:16,355 --> 00:02:20,035
and we will both have
the same interface.

52
00:02:20,030 --> 00:02:21,980
Now, next thing I
want to talk about is

53
00:02:21,980 --> 00:02:23,980
the hierarchy window right here.

54
00:02:23,975 --> 00:02:25,735
So if we click on
this right here,

55
00:02:25,730 --> 00:02:28,140
we can see that we
have a main camera

56
00:02:28,144 --> 00:02:29,544
and this is our scene view.

57
00:02:29,540 --> 00:02:31,610
We'll get to our
scene view and we

58
00:02:31,610 --> 00:02:34,270
have the directional
light right here.

59
00:02:34,265 --> 00:02:37,165
But this hierarchy,
hierarchy right

60
00:02:37,160 --> 00:02:41,170
here represents every
game object in our scene.

61
00:02:41,165 --> 00:02:45,575
So each item in the scene
an entry in the hierarchy.

62
00:02:45,575 --> 00:02:49,715
So the two windows are
enhancement inherently linked.

63
00:02:49,715 --> 00:02:52,495
The hierarchy reveals
the structure of how

64
00:02:52,490 --> 00:02:55,420
game object attach
to each other.

65
00:02:55,415 --> 00:02:57,485
And you will see in more detail

66
00:02:57,485 --> 00:03:00,245
what I mean by attached
to each other.

67
00:03:00,245 --> 00:03:02,875
Now next thing we have the
scene view right here.

68
00:03:02,870 --> 00:03:05,540
And if we right-click
on our mouse button,

69
00:03:05,540 --> 00:03:07,640
we can actually
move around using

70
00:03:07,640 --> 00:03:10,820
the a WASD keys right here.

71
00:03:10,820 --> 00:03:13,720
And you can see that we
can move around our world.

72
00:03:13,715 --> 00:03:17,125
And in here we are going
to be building our games.

73
00:03:17,120 --> 00:03:20,390
We also have another window
right here that is the game,

74
00:03:20,390 --> 00:03:22,400
and this is our game view.

75
00:03:22,400 --> 00:03:24,340
So this is how we see

76
00:03:24,335 --> 00:03:27,875
our game from the
camera's perspective,

77
00:03:27,875 --> 00:03:29,785
will be changing
everything around.

78
00:03:29,780 --> 00:03:33,080
And this is where we are
going to be most focused

79
00:03:33,080 --> 00:03:36,830
on later on with
our game creation.

80
00:03:36,830 --> 00:03:38,240
Next thing we have

81
00:03:38,240 --> 00:03:40,160
the inspector window on

82
00:03:40,160 --> 00:03:42,350
the right and let
me go back scenes.

83
00:03:42,350 --> 00:03:43,930
So in an inspector window,

84
00:03:43,925 --> 00:03:46,225
you are allowed to view and edit

85
00:03:46,220 --> 00:03:50,110
all the properties of the
currently selected game object.

86
00:03:50,105 --> 00:03:51,985
So as you can see
right now we have

87
00:03:51,980 --> 00:03:53,840
the directional light selected.

88
00:03:53,840 --> 00:03:56,540
We can increase and
decrease the intensity.

89
00:03:56,540 --> 00:03:58,180
We can change the color,

90
00:03:58,175 --> 00:03:59,965
we can play around
with everything.

91
00:03:59,960 --> 00:04:02,480
And we also have the
main camera right here.

92
00:04:02,480 --> 00:04:04,520
We can also change and play

93
00:04:04,520 --> 00:04:07,420
around with various properties.

94
00:04:07,415 --> 00:04:10,325
And the inspector right here.

95
00:04:10,325 --> 00:04:12,865
And these technical
words are very important

96
00:04:12,860 --> 00:04:15,740
because I will be using
them throughout the course.

97
00:04:15,740 --> 00:04:19,160
So remember a
hierarchy inspector,

98
00:04:19,160 --> 00:04:22,340
the scene view,
the game of view.

99
00:04:22,340 --> 00:04:26,170
And finally, we have the
project window right here.

100
00:04:26,165 --> 00:04:28,075
And this is where we display

101
00:04:28,070 --> 00:04:31,250
the libraries and
assets of our game.

102
00:04:31,250 --> 00:04:33,110
So if you click on
assets, currently,

103
00:04:33,110 --> 00:04:36,100
we have nothing else
besides the scenes.

104
00:04:36,095 --> 00:04:37,765
And if we double-click
on scenes,

105
00:04:37,760 --> 00:04:40,190
we have the sample scene right

106
00:04:40,190 --> 00:04:43,970
here that we can double-click
and enter, we can save.

107
00:04:43,970 --> 00:04:47,350
So we don't have anything
besides our scenes.

108
00:04:47,345 --> 00:04:52,015
Next, let's talk about Visual
Studio and what it is. 0.

109
00:04:52,010 --> 00:04:55,040
Okay, so what is Visual Studio?

110
00:04:55,040 --> 00:04:57,670
So Visual Studio is actually

111
00:04:57,665 --> 00:05:01,625
Microsoft Visual Studio
and it's an IDE.

112
00:05:01,625 --> 00:05:03,005
What is an ID?

113
00:05:03,005 --> 00:05:06,245
It's an integrated
development environment.

114
00:05:06,245 --> 00:05:08,555
And what that means
is that it's like

115
00:05:08,555 --> 00:05:10,975
an environment for us

116
00:05:10,970 --> 00:05:15,850
to develop integrated
code into Unity.

117
00:05:15,845 --> 00:05:18,725
So this is a very
complicated explanation,

118
00:05:18,725 --> 00:05:20,725
but this basically is where we

119
00:05:20,720 --> 00:05:22,990
are going to write
all of our code.

120
00:05:22,985 --> 00:05:26,135
And VS will help
us write the code.

121
00:05:26,135 --> 00:05:31,625
Use to manipulate game objects
in Unity using scripts.

122
00:05:31,625 --> 00:05:34,775
So what our scripts,

123
00:05:34,775 --> 00:05:38,375
this is the way we use
Unity with Visual Studio.

124
00:05:38,375 --> 00:05:42,035
So we want unity to communicate
with Visual Studio.

125
00:05:42,035 --> 00:05:44,845
In unit, you are going to
be creating game objects.

126
00:05:44,840 --> 00:05:47,330
So for example, the car
that we want to move

127
00:05:47,330 --> 00:05:50,500
while not got the player
that we want to move around.

128
00:05:50,495 --> 00:05:53,395
The maybe objects
that fall down,

129
00:05:53,390 --> 00:05:55,730
maybe some kind,
the weapons that

130
00:05:55,730 --> 00:05:58,210
shoot the monsters
that attack us.

131
00:05:58,205 --> 00:06:02,465
We put these, all of
these objects in Unity.

132
00:06:02,465 --> 00:06:04,765
But whenever we want
to manipulate them,

133
00:06:04,760 --> 00:06:07,460
we are going to
use Visual Studio.

134
00:06:07,460 --> 00:06:09,910
But unity and Visual Studio

135
00:06:09,905 --> 00:06:13,295
don't automatically
work together.

136
00:06:13,295 --> 00:06:16,435
The way we make them
work together is through

137
00:06:16,430 --> 00:06:20,030
these scripts which
are dot CSV files.

138
00:06:20,030 --> 00:06:23,170
And this is where we
write all of our codes

139
00:06:23,165 --> 00:06:27,535
in the dot CSS files in
Visual Studio and there,

140
00:06:27,530 --> 00:06:30,650
and from these scripts we
are going to manipulate

141
00:06:30,649 --> 00:06:32,899
the behaviors of the objects

142
00:06:32,900 --> 00:06:35,480
that we have inside of Unity.

143
00:06:35,480 --> 00:06:38,830
So let me just show you
how Visual Studio looks.

144
00:06:38,825 --> 00:06:40,675
So this is Visual Studio.

145
00:06:40,670 --> 00:06:42,860
Let me just zoom in a bit.

146
00:06:42,860 --> 00:06:45,260
And in here you can
see that first of all,

147
00:06:45,260 --> 00:06:48,820
we have these three lines
which are using something,

148
00:06:48,815 --> 00:06:51,805
using something and
using Unity's engine.

149
00:06:51,800 --> 00:06:54,650
Now these are called namespaces.

150
00:06:54,650 --> 00:06:56,320
And what these are,

151
00:06:56,315 --> 00:06:59,965
they are a collection
or a library of codes

152
00:06:59,960 --> 00:07:03,800
that allow us to use
certain things in our game.

153
00:07:03,800 --> 00:07:06,740
So for example, the
Unity engine allows us

154
00:07:06,740 --> 00:07:09,650
to use different
aspects of unity.

155
00:07:09,650 --> 00:07:11,990
For example, the
physics in Unity.

156
00:07:11,990 --> 00:07:13,900
It allows us to access

157
00:07:13,895 --> 00:07:18,485
various details in Unity
that without this.

158
00:07:18,485 --> 00:07:21,575
So for example, if we remove
this line right here,

159
00:07:21,575 --> 00:07:23,905
we can no longer
use mono behavior.

160
00:07:23,900 --> 00:07:26,350
And because we are not
using 10 behavior,

161
00:07:26,345 --> 00:07:27,715
which we'll get to in a second.

162
00:07:27,710 --> 00:07:30,910
We can no longer use
start and update.

163
00:07:30,905 --> 00:07:35,285
So we'll turn this back on
and we can use mono behavior.

164
00:07:35,285 --> 00:07:36,655
Before we get to that,

165
00:07:36,650 --> 00:07:38,750
let's first talk about
what public means.

166
00:07:38,750 --> 00:07:41,120
Public means that
it's for everybody.

167
00:07:41,120 --> 00:07:42,260
There are two types.

168
00:07:42,260 --> 00:07:44,700
There are public and
there are private.

169
00:07:44,704 --> 00:07:46,414
We'll get to that also.

170
00:07:46,415 --> 00:07:47,285
Later on.

171
00:07:47,285 --> 00:07:51,115
We have the class and
we have the class name,

172
00:07:51,110 --> 00:07:54,020
and this is actually
the name of our script.

173
00:07:54,020 --> 00:07:57,080
And we will learn that we
have to always make sure that

174
00:07:57,080 --> 00:08:00,890
we name our class
correctly the first time,

175
00:08:00,890 --> 00:08:04,090
because it will create a
lot of problems for us.

176
00:08:04,085 --> 00:08:06,985
So this is how we create
a class and all of

177
00:08:06,980 --> 00:08:08,180
this code will be written

178
00:08:08,180 --> 00:08:10,610
automatically so you don't
have to worry about it.

179
00:08:10,610 --> 00:08:13,090
These two points right
here means that we are

180
00:08:13,085 --> 00:08:16,715
inherited, inheriting
mono behavior.

181
00:08:16,715 --> 00:08:21,115
So what is Monte behavior
10 behavior are, well,

182
00:08:21,110 --> 00:08:24,070
we use behaviors that

183
00:08:24,065 --> 00:08:27,125
are already built into
Unity that allows,

184
00:08:27,125 --> 00:08:30,425
allows us to control the
various game objects.

185
00:08:30,425 --> 00:08:32,305
And because of money behavior,

186
00:08:32,300 --> 00:08:35,330
we can use two
methods or functions,

187
00:08:35,329 --> 00:08:37,579
which of course will
be later on getting

188
00:08:37,580 --> 00:08:40,210
into like start and update.

189
00:08:40,205 --> 00:08:42,175
And actually in here
you can see that we

190
00:08:42,170 --> 00:08:44,210
have this green line.

191
00:08:44,210 --> 00:08:46,820
And this green line means
that this is a comment.

192
00:08:46,820 --> 00:08:48,680
And whenever you want
to create a comment,

193
00:08:48,680 --> 00:08:52,000
you simply put these two
back slashes behind it.

194
00:08:51,995 --> 00:08:55,555
And whenever we put two
backslashes behind any code,

195
00:08:55,550 --> 00:08:58,070
it means that this is
a comment and it will

196
00:08:58,070 --> 00:09:00,850
not be executed in coat.

197
00:09:00,845 --> 00:09:03,055
Great, so what is start?

198
00:09:03,050 --> 00:09:06,400
Start is called before
the first frame update.

199
00:09:06,395 --> 00:09:09,505
So when ever the
game object that has

200
00:09:09,500 --> 00:09:12,950
this script attached
to it starts,

201
00:09:12,950 --> 00:09:16,910
the code inside of this start
method will be executed.

202
00:09:16,910 --> 00:09:21,290
And similar to start update
is called once per frame.

203
00:09:21,290 --> 00:09:24,730
So every frame our
game goes through.

204
00:09:24,725 --> 00:09:28,195
This method, update will be
called an everything inside

205
00:09:28,190 --> 00:09:31,810
of it will be executed
to put it more simply,

206
00:09:31,805 --> 00:09:35,215
start is where we put
our initial conditions.

207
00:09:35,210 --> 00:09:37,660
So for example, the
weight of the car,

208
00:09:37,655 --> 00:09:41,755
the speed of our player,
the climate maybe.

209
00:09:41,750 --> 00:09:46,040
And then update is where
we make our car move.

210
00:09:46,040 --> 00:09:48,500
We make our player jump,

211
00:09:48,500 --> 00:09:51,620
and we make the climate change,

212
00:09:51,620 --> 00:09:54,310
for example, the wind
blows up or something.

213
00:09:54,305 --> 00:09:55,855
And the other, I don't know.

214
00:09:55,850 --> 00:10:01,300
So this is how we basically
use Unity with Visual Studio.

215
00:10:01,295 --> 00:10:04,555
Of course, in the future as
we move through our project,

216
00:10:04,550 --> 00:10:05,980
you will have a much,

217
00:10:05,975 --> 00:10:07,525
much better understanding of

218
00:10:07,520 --> 00:10:10,690
the start and update
and everything in it.

219
00:10:10,685 --> 00:10:12,925
So don't be worried too

220
00:10:12,920 --> 00:10:16,000
much if you don't understand
everything right away.

221
00:10:15,995 --> 00:10:20,995
But now you have a
challenge in front of you.

222
00:10:20,990 --> 00:10:24,190
And your challenge is going
to go and make a mass.

223
00:10:24,185 --> 00:10:27,115
So open Unity and mess around.

224
00:10:27,110 --> 00:10:28,820
Click on a few things.

225
00:10:28,820 --> 00:10:30,440
And when you're finished,

226
00:10:30,440 --> 00:10:33,410
go to the next video and
we are going to be making

227
00:10:33,410 --> 00:10:36,560
our first code and get started.

228
00:10:36,560 --> 00:10:38,120
And it's you still don't

229
00:10:38,120 --> 00:10:39,830
know how to create
a new project.

230
00:10:39,830 --> 00:10:41,080
Don't worry about it.

231
00:10:41,075 --> 00:10:43,195
In the next video, we
are going to create

232
00:10:43,190 --> 00:10:45,520
a project and make our first go.

233
00:10:45,515 --> 00:10:47,635
So I hope you enjoyed
this video and

234
00:10:47,630 --> 00:10:50,880
I'll see you in the next one.

