Hello and welcome back,
my fellow game developers.
In this video, we are simply
going to be explaining what Unity is,
what Visual Studio is,
how they communicate with each other.
And we'll explain a little bit about
the interface of both these amazing tools.
So first of all, what is unity?
Let me put on my laser.
So laser please. Okay.
So unity is a cross-platform game engine developer by,
developed by Unity Technologies.
So what do I mean by cross-platform?
Cross-platform means that it can be used
on different kinds of platforms.
For example, unity, Windows and
Mac OS will be using Unity to develop our games.
And we of course going to be using
this Unity engine right here.
So before we move on,
let me just show you the interface of unity and we
will move on to explaining Visual Studio,
and this is unity.
Congratulations, you've made it this far.
So first of all,
we have our toolbar right here about everything.
And this toolbar provides access to
the most essential working features.
On the left, we have the basic tools for
manipulating the scene view
and the game objects within it.
In the center we have the play and
pause and step control right here,
which allows us to play our game, pause our game.
And then we can also add a step frame by frame.
The buttons on the right gives you access to unity,
collaborate, and the Cloud
which will not be using and the accounts.
We also have the layers right here that we will be
using a lot in this course for our project.
And we finally have the layout and bi-layer.
This is our layout right here.
So we can change the layout, for example,
the two by three or the four split.
Or we can basically use
the default and this is what we are going to be using.
So if you don't have the same interface
as me or different kinds of layouts.
Simply click on here, go to default,
and we will both have the same interface.
Now, next thing I want to talk about is
the hierarchy window right here.
So if we click on this right here,
we can see that we have a main camera
and this is our scene view.
We'll get to our scene view and we
have the directional light right here.
But this hierarchy, hierarchy right
here represents every game object in our scene.
So each item in the scene an entry in the hierarchy.
So the two windows are enhancement inherently linked.
The hierarchy reveals the structure of how
game object attach to each other.
And you will see in more detail
what I mean by attached to each other.
Now next thing we have the scene view right here.
And if we right-click on our mouse button,
we can actually move around using
the a WASD keys right here.
And you can see that we can move around our world.
And in here we are going to be building our games.
We also have another window right here that is the game,
and this is our game view.
So this is how we see
our game from the camera's perspective,
will be changing everything around.
And this is where we are going to be most focused
on later on with our game creation.
Next thing we have
the inspector window on
the right and let me go back scenes.
So in an inspector window,
you are allowed to view and edit
all the properties of the currently selected game object.
So as you can see right now we have
the directional light selected.
We can increase and decrease the intensity.
We can change the color,
we can play around with everything.
And we also have the main camera right here.
We can also change and play
around with various properties.
And the inspector right here.
And these technical words are very important
because I will be using them throughout the course.
So remember a hierarchy inspector,
the scene view, the game of view.
And finally, we have the project window right here.
And this is where we display
the libraries and assets of our game.
So if you click on assets, currently,
we have nothing else besides the scenes.
And if we double-click on scenes,
we have the sample scene right
here that we can double-click and enter, we can save.
So we don't have anything besides our scenes.
Next, let's talk about Visual Studio and what it is. 0.
Okay, so what is Visual Studio?
So Visual Studio is actually
Microsoft Visual Studio and it's an IDE.
What is an ID?
It's an integrated development environment.
And what that means is that it's like
an environment for us
to develop integrated code into Unity.
So this is a very complicated explanation,
but this basically is where we
are going to write all of our code.
And VS will help us write the code.
Use to manipulate game objects in Unity using scripts.
So what our scripts,
this is the way we use Unity with Visual Studio.
So we want unity to communicate with Visual Studio.
In unit, you are going to be creating game objects.
So for example, the car that we want to move
while not got the player that we want to move around.
The maybe objects that fall down,
maybe some kind, the weapons that
shoot the monsters that attack us.
We put these, all of these objects in Unity.
But whenever we want to manipulate them,
we are going to use Visual Studio.
But unity and Visual Studio
don't automatically work together.
The way we make them work together is through
these scripts which are dot CSV files.
And this is where we write all of our codes
in the dot CSS files in Visual Studio and there,
and from these scripts we are going to manipulate
the behaviors of the objects
that we have inside of Unity.
So let me just show you how Visual Studio looks.
So this is Visual Studio.
Let me just zoom in a bit.
And in here you can see that first of all,
we have these three lines which are using something,
using something and using Unity's engine.
Now these are called namespaces.
And what these are,
they are a collection or a library of codes
that allow us to use certain things in our game.
So for example, the Unity engine allows us
to use different aspects of unity.
For example, the physics in Unity.
It allows us to access
various details in Unity that without this.
So for example, if we remove this line right here,
we can no longer use mono behavior.
And because we are not using 10 behavior,
which we'll get to in a second.
We can no longer use start and update.
So we'll turn this back on and we can use mono behavior.
Before we get to that,
let's first talk about what public means.
Public means that it's for everybody.
There are two types.
There are public and there are private.
We'll get to that also.
Later on.
We have the class and we have the class name,
and this is actually the name of our script.
And we will learn that we have to always make sure that
we name our class correctly the first time,
because it will create a lot of problems for us.
So this is how we create a class and all of
this code will be written
automatically so you don't have to worry about it.
These two points right here means that we are
inherited, inheriting mono behavior.
So what is Monte behavior 10 behavior are, well,
we use behaviors that
are already built into Unity that allows,
allows us to control the various game objects.
And because of money behavior,
we can use two methods or functions,
which of course will be later on getting
into like start and update.
And actually in here you can see that we
have this green line.
And this green line means that this is a comment.
And whenever you want to create a comment,
you simply put these two back slashes behind it.
And whenever we put two backslashes behind any code,
it means that this is a comment and it will
not be executed in coat.
Great, so what is start?
Start is called before the first frame update.
So when ever the game object that has
this script attached to it starts,
the code inside of this start method will be executed.
And similar to start update is called once per frame.
So every frame our game goes through.
This method, update will be called an everything inside
of it will be executed to put it more simply,
start is where we put our initial conditions.
So for example, the weight of the car,
the speed of our player, the climate maybe.
And then update is where we make our car move.
We make our player jump,
and we make the climate change,
for example, the wind blows up or something.
And the other, I don't know.
So this is how we basically use Unity with Visual Studio.
Of course, in the future as we move through our project,
you will have a much,
much better understanding of
the start and update and everything in it.
So don't be worried too
much if you don't understand everything right away.
But now you have a challenge in front of you.
And your challenge is going to go and make a mass.
So open Unity and mess around.
Click on a few things.
And when you're finished,
go to the next video and we are going to be making
our first code and get started.
And it's you still don't
know how to create a new project.
Don't worry about it.
In the next video, we are going to create
a project and make our first go.
So I hope you enjoyed this video and
I'll see you in the next one.