>> Hello. Welcome to our Unity 101 videos. I'm Abdulla.
In this video, I'm going to teach you how to
install Unity as well as Visual Studio,
and then get familiar with the user interface for
both so we can start scripting. Let's get started.
To install Unity on both Windows and Mac,
you can head to Unity's website: store.unity.com/download.
We can start the installation after it downloads,
we can choose where we want to install it,
and then we can run the Unity Hub.
When you run the Unity Hub on the Installation tab on the left,
you can see that we have no unity versions installed.
So we can press on "Add".
We recommend installing the long-term support versions
for more stability and as the name says,
long-term support from Unity.
If you don't have Visual Studio installed,
you have the option of installing
Visual Studio as part of the installation process here.
Then you can choose which platform you want to support,
agree to the terms and conditions, and start installing.
If you install Visual Studio separately on Windows,
make sure you install
the Unity support from the Visual Studio Installer.
Visual Studio for Mac is already bundled with support for Unity,
so you don't need to add support for Unity separately.
To find the Visual Studio Installer,
just search for Visual Studio installer on the Windows Start menu.
So it's a good idea to update if there is any updates available.
Click on "Modify" next to the installation you'll want to use.
Check the box with Game development with Unity.
You can install while downloading,
or you can just install by clicking "Modify".
After Unity installs, now we can start a new project.
Let's go to "Project" tab here on the left,
and then click on the "New" button.
Let's choose 3D and let's call the project something
like cubes, and press "Create".
This will create a new 3D project for us to use.
It might take some time to put up
Unity for the first time with your project.
This is what Unity looks like once the project is all loaded.
The first thing we want to do,
is to check that we're using the byte editor for scripts.
You can go to "Edit" on top,
go to "Preferences",
and choose "Visual Studio" from the menu here.
Let's get familiar a little bit with the Unity interface.
Right here, we can see a hierarchy of
all the game objects within this GameScene,
and right over here we can see a scene view
where we can look around the 3D scene.
Since we have a camera object within a scene,
you can see what the camera sees in the "Game" window here.
If you click on an object in the hierarchy,
you can see all of its components and
elements in the "Inspector" window.
You can visually monitor the variables here or you can edit them,
more about that later.
Down here, you can see the Project files,
as it exists on your hard drive.
Let's create the first C# Sharp script.
To right-click on the "Asset" folder,
choose "Create", and then "C# Sharp script".
Let's call it Rotating cube.
Now let's create just an empty cube within the scene.
In the hierarchy, let's right-click "3D Object" and choose "Cube".
This will create just a cube into our scene.
If you look at the Inspector, you can see
all the variables and all the components that make up this cube.
Over here is the Transform.
Let's bring this down a little bit. There we go.
That's a good cube. There are
so many ways to add a script to a game object.
The first way, is to just drag and drop
it and we'll put it inside of the cube.
If we click on the cube now in the Inspector,
we can see that the rotating cube component
has been added to the cube.
When you double-click on a C# Sharp script from Unity,
it will open up Visual Studio,
and it will inform Visual Studio that this is a Unity project.
This will make sure all the tools for Unity are loaded.
A good way to know that Visual Studio
have recognized that this is a Unity project,
is to see if Attach to Unity is available over here on top.
You will also see that there is
a Unity Project Explorer where you
can look at all the Unity files available to you.
This applies to both Visual Studio
on Windows and Visual Studio on Mac.
This concludes our first video,
but let's rehearse what we just learned.
We just installed Unity and Visual Studio.
We also created a cube and moved it around
and really got familiar with the Unity interface.
Then we created a script and we got Visual Studio ready to code.
Join us in the next video where we dive deeper into coding
with C# Sharp for Unity. See you there.
[MUSIC]