Game Basics Intro to Unity
GCC Academy
Hello everyone
Hello, this is Tak Kwang-wook, in charge of Unity Game Programming
In this lesson, we will explore why we need to use the Unity engine
from the perspective of the content development process
We will learn how to install and operate Unity by
understanding the content creation process,
installing the Unity engine and creating a project,
and examining Unity’s screen layout and learning its operations
Let's practice editor manipulation by creating a simple chair object
Overview of the Unity Engine and Installation
To understand the Unity engine, we first need to explore the content creation process
As shown in the diagram, the process begins
with the proposal and planning stage, where the feasibility of development is reviewed
Then, prototyping is used to validate the proposal and plan
If the result is positive, the full-fledged project starts,
with step-by-step schedules being calculated
Following alpha and beta testing for commercialization,
the product is eventually released to the market
A content requires this many processes before it is released
While the quality of the content is essential,
development costs are equally significant
Delays in the schedule, caused by
either internal or external factors, can heavily impact
production costs and burden developers
Historically, most development companies followed a sequential process
like this diagram
The planner completes the plan
and hands it to the artists and programmers
Art resources are created,
and then
passed to the programmers, who then proceed with programming tasks
This sequential approach often caused problems,
as each stage depended
on the completion of the previous one
This causes a heavy workload for programmers towards the end of the project,
since other teams rely on programmers for incorporating changes or modifications
The workload is unevenly distributed over the project timeline,
resulting in an overload
Programmers, as well as planners, face
an increasing workload during the early stages of a project
Following the completion of the planning stage, the art team’s workload increases sequentially
In early stages, the planner carries the workload
Mid stages, the artist bears the burden
And late stages, the programmer’s workload peaks
This sequential structure is inherently inefficient
The diagram illustrates an improved parallel development model
For efficient development, as depicted in the diagram,
tasks should not be concentrated at specific stages
but rather evenly distributed throughout the project
To achieve this,
the verification and application of results
for each discipline should proceed independently,
without dependency on other teams
This approach leads to improved quality of the output,
shortened development periods, reduced production costs,
and ultimately enabling more efficient development overall
Unity Engine allows for a parallel production method
that improves efficiency in content development
The structure of Unity
is similar to Lego
Understanding Lego building makes it easier to understand Unity
Lego uses blocks to build its basic objects
Unity also uses basic elements called components
that are combined to create a game object
When creating actual content, it is done as follows
Each department creates components corresponding to Lego blocks like this,
and then they create game objects
By creating Lego blocks for each department,
parallel development by department becomes possible
Then, after creating objects with Legos, they are arranged and packaged
In Unity, a similar method is used
Game objects composed of these components are arranged in space,
to create one scene
And the Lego series is structured as Lego packages according to the components
This Lego package can be seen as part of a Lego series
In Unity, according to the components, it is divided into several scenes,
and all those scenes are part of a single project
In conclusion, Unity’s structure is like the picture shown,
and you can see that it is assembled in a way similar to Lego
The whole structure consists of individual scenes within a large project,
and within those scenes, there are game objects,
which are made up of components,
which is how the project is structured
Using this engine, which allows for department-specific creation similar to Lego,
the process proceeds as follows
First is prototyping
The programmer does not
wait for the art resources but,
based on the design intention
instead, uses basic shapes
supported by Unity
This is called prototyping
It allows simultaneous work by each department
Even when real resources are used from the beginning,
there is a high chance that they will be discarded during development,
which leads to an increase in development costs
By prototyping, the design or content concepts
can be validated first,
and then applied, which is very efficient
After validating the design through prototyping,
and receiving resources from the art team, the resources can be swapped out,
which improves the quality of the content
The final external verification is the alpha version,
and after optimization, when the content runs smoothly,
it becomes the beta version
And once all processes are completed without issues,
the service is launched to the users
So the development progresses
in the order of prototyping, alpha version,
and then the beta version in Unity engine
Until now, we have discussed the development methodology
Now, let’s start with the Unity installation and go step by step
To install Unity, we go to the Unity website
We need to sign up
and log in on the website
Click the user icon on the top right to sign up and log in
On the right top
I'm logged in already,
so we see the ID here
You must see that user icon there
Click on it to sign up and log in
To use Unity, you have to install Unity Launcher
Go to Download in the center
Or you can click on Plans to download it
Click Download to go there
Click on Plans
And you can buy the version that suits your needs
We'll go with the second, Unity Personal,
which is free
Let's download this free version
Now,
you see the same screen as when you clicked on Download
So click on it
Now we have the installer for Unity Hub
Double click on it to install
Then it installs the hub for you
You will be prompted to install the Unity Editor
The program we installed
is not the Unity Editor itself,
but Unity Hub,
which manages all the Unity projects we create
Think of it as a launcher that manages the Unity Editor
So for that,
we'll be using Unity Engine
But we have no Editor
So this window allows you to install it automatically
Let's close the window
Let's skip this
Let's install it manually
If you're not logged in,
it will say that you should sign in
If you're already logged in,
you'll see your own account on the top left
We have Install on the left
The Install section is where you can initially install the Unity Editor
This section allows you to manage the Unity Editor by version
If you click here, you’ll notice that nothing is listed at first
Because there’s nothing,
the Install Editor button is activated
You can click to install here,
but there is also a blue Install Editor button in the top-right corner
If you click on this button, you can download the Unity Editor in the version you want
You’ll see several options,
including Unity 6 Preview
and, below that, Unity 2022.3.50 LTS
For now, we’ll install
the second option, 2022.3.50 F1
You will notice that the LTS version is checked
LTS stands for Long-Term Support,
which is
the stabilized version of Unity
Unity has three types of versions
The first is the Preview version,
which is not officially released
but is a test version showing
new technologies and interfaces
Currently, Unity 6
is available as a preview
After passing through the preview phase and if it’s found to be stable,
it’s officially released without the Preview label
There,
if Unity 6 weren’t a preview version and had been officially released,
it would be available simply as Unity 6
Eventually, bugs may arise
As bugs are found
and then fixed,
the version will continue to evolve
as time passes
Eventually, it will reach a point
where there are no issues remaining in development,
and Unity will consider that version stable
At that point, Unity will label it with LTS
to indicate that it’s ready for long-term support,
saying, this version is stabilized,
and if you create projects with this version,
it will be highly stable
So this is the LTS version Unity releases
There are three types of versions
For our learning purposes, we will use the LTS version,
the stable version
However, even in the stable version, there might still be bugs
Bug fixes will continue to happen
For example, in the second part of the version,
2022.3, this can change significantly
when we are progressing
with projects or in our learning
The first numbers may change,
and some features may be unavailable or the interface may change
However, the version number after the decimal, like 50f1,
will gradually get fixed with updates
So, as these bug fixes are applied,
the version number might change,
going from 40, 41, 49, and 50
So, until I prepared this video,
I was using version 3.49,
but just recently, it was updated to version 50
Therefore, for the first two digits in the version,
you don’t need to worry about them at all
It won’t cause any problems with your learning
So, for the version 2022.3,
the numbers up to 3, no matter what version you use, won’t be a big issue
Whether it’s 49, 50, or even 51 later on,
it won’t affect your learning
So, I will install the LTS version, 3.50f1
Now, I’ll click the Install button
When you do, several options will appear,
asking what you would like to install
The first option is the Development Tools,
specifically Visual Studio Community 2021
This is checked by default, meaning it will be installed
This Visual Studio option is needed
because when you create functions using the Unity engine,
you’ll write code
using the C# programming language
Visual Studio is the program used to write that code,
and it will be installed when you install Unity
If you don’t have Visual Studio, make sure to check this option
Next is the Platform section
Here, you can choose
if you want
to create applications
that run on Android or iOS,
things like these
You can select the platform depending
on the project you’re working on
If this box is not checked,
it will assume you’re creating applications for PC
You can add these platforms later,
so I will proceed without checking them for now
I’m going to cancel the Visual Studio installation
since it’s already installed on my system,
and I will install the Unity engine instead
I'll Install
The download will begin,
and you will see a progress bar at the bottom of the launcher,
showing the download status
Once the progress bar is full, the installation will be complete
This might take a while
It is complete now
It took a while
Once the editor installation is complete, you’ll see a box on the right side
of the Install section indicating the installation is finished
Now, you can start using the Unity engine to work on your projects
Let’s create our first project.
If you click the Project category on the left,
you’ll see an empty screen on the right
Right now, there’s nothing there,
but as you continue learning
and create projects,
you’ll see a list of them appear here
Currently, my language is set to English,
but when you first install it, it might be in Korean
In that case, you can change it
by clicking the Preferences button at the top of the launcher
here, you’ll find the Appearance option,
ans here,
it says English now
If your is Korean,
it will say so, Korean
I prefer English, so I'll keep it
That's where you can set the langauge
And speaking of preferences, there is a section for licenses
In my case, I currently have the Personal license registered
If you don’t have a license registered,
it’s a good idea to get a free license by clicking Add
If you encounter issues where the project
doesn’t open or there are problems with the license,
you can go to the “Preferences” section
and click the Add button under the License section
to obtain your license
Now, let’s get started by creating a project
Click on the Project category on the left,
and then click New Project on the right
When you click the Create Project button,
the screen will change
The launcher screen will update
At the top, there will be a button
allowing you to choose the engine version for the project you want to create
If you’ve installed another version of the engine,
you can select the version you want here
Since I’ve installed version 2022.3.50,
this version is automatically selected for me
Now, in the center,
you’ll see several options to configure
One of them is the 3D Built-in Render Pipeline,
which is currently selected
It's currently selected
The key options to pay attention to are the Universal 3D
and High Definition 3D pipelines
These are the three options you should focus on
If you’ve seen tutorials on YouTube or elsewhere,
you may have heard terms
like URP, HDRP, or Built-in Pipeline
What these refer to
is how 3D objects in the graphics space
are rendered onto the screen
These three methods are the primary options
The 3D option is the traditional method,
the one used in the standard Unity engine
for displaying 3D objects
The Universal 3D Pipeline or URP
is a more advanced method
than the Built-in Pipeline,
providing better graphic quality
due to an improved calculation method
The High Definition 3D pipeline
offers even higher-quality graphics than URP
It’s a calculation method that provides the best graphical quality,
suitable for projects
requiring high-end hardware,
better graphics cards,
and cinema-quality visuals
High Definition 3D is suitable for these
So, if we look at the three major types,
we can divide them into three categories
Since this is for learning,
we’ll select the 3D Built-in Render Pipeline,
which is the traditional method
for rendering 3D objects in Unity
With the Built-in Render Pipeline 3D selected, on the right side,
you can choose the project name
and the installation path for the project
For the name, I’ll just keep it as My Project,
and for the location, I created a folder called Unity Projects on the C drive
and saved the path there
If you click the folder button on the right, you can specify the path
Below that, there’s the option to Connect to Unity Cloud,
which would allow you to use Unity Cloud,
but this isn’t necessary, so I’ll uncheck it
Now, click Create Project at the bottom to create the project
As of the time of editing this recording,
Unity 6 has been officially released as an LTS version
However, when creating a project with Unity 6,
the URP version is selected by default,
and if you want to use the older Built-in 3D Core version, you will need to install the corresponding template separately
Until the 2022 LTS version, the situation was the opposite
The Built-in 3D Core version was the default,
and if you wanted to use the URP version, you had to install the template separately
Now, let’s briefly look at how to install the template
First, choose your project,
then select New Project to create it
When you click this,
If we look at the current version, 2022.3 is selected,
but if the editor version is changed to version 6,
the default installed version will change
to the Universal 3D Core version
This is the URP version
If you look at the detailed information on the right,
it specifies that it’s the Universal Pipeline URP version
So, we can see that the URP version is selected by default
If you scroll down,
you’ll see the 3D Built-in Render Pipeline Core option
located at the bottom
To use this 3D Built-in Render Pipeline Core template
for your project,
select it and then click Download Template on the right
This should only take a moment
When the cloud icon disappears,
that means the download is complete
After downloading,
you can proceed by selecting the Create Project button
to create the project using the Built-in version
From now on, the steps will be the same
So, for the upcoming videos, we will be using version 2022.3.50
or 4.9 for learning
However, if you have experience with Unity
and are comfortable with it,
you can use version 6 to learn and experiment
Just be mindful of the version difference,
and you’ll be able to follow along with the rest of the tutorials
Unity’s Interface and Object Handling
It took some time to create the project,
but once it’s created, this window will appear,
and we’ll continue working on the project in this editor
Let's look at it one by one
Let’s take a look at the interface
On the top left, we have the Hierarchy panel,
in the center, the Scene panel,
and on the right, the Inspector panel
At the bottom, you’ll find the Project panel
You can adjust the area of each panel by placing the mouse cursor in the middle,
just like this
These panels can also be dragged by clicking on the tabs above,
and you can attach them to the side
or float them freely in the center
Let’s try floating the panel
Once you’re done, you can drag them back and forth,
making the workspace flexible
The default layout
It may not be the most convenient for us during project work or learning,
so let’s change it to a more comfortable layout
At the top, there’s a Default option
Click on it,
and then click on the Tall option below
You can see that the layout has been reorganized like this
To return to the default layout, simply change it back to Default,
and it will return to its original state
Let me switch it back to Tall
Also,
if you look at the top,
you can see that the Game and Scene panels are overlapping
It’s a bit inconvenient, so I’ll drag the Game view to the bottom
to make it more comfortable
Let’s take a closer look at the interface
On the left, there is the Scene view,
here you can see the workspace
This space is where we do most of our work
In Unity, the objects we work with are called Game Objects
This is the space where we place those game objects
On the right, there is the Hierarchy panel
This panel shows a list of all the game objects in the scene
Right now, you can see the name of the scene, Sample Scene,
and if you click the arrow next to it,
you can see the game objects inside the scene
For example, there is a Main Camera game object
and a Directional Light game object
listed there like this
When you select one of these,
it will highlight the selected game object in the Scene view,
showing you its location
On the right, you’ll see the Inspector panel
As you can see, when you select a game object,
the content in the Inspector panel changes accordingly
The Inspector panel is where you can adjust
the settings of the selected game object
Let's go down
and we see Project
Think of the Project panel as similar to Windows Explorer
It shows all the files related to your project
The items at the top are the Game Objects
These are the game objects in the scene
The game objects exist in memory,
but you can think of them as virtual objects
They don’t actually exist in physical space
So these copies are called instances
The Hierarchy panel shows virtual objects that exist in memory,
whereas the Project panel
deals with actual files stored on your hard drive or SSD
These files are the physical assets used in the project
In Unity, we refer
to these as Assets
Assets
So we see Assets here
In the Project panel, you can organize these assets into folders,
and this space is where you manage your assets
In the Game view,
you see how the scene and the objects you’ve arranged in the Scene view
or the settings you’ve adjusted in the Hierarchy
and Inspector panels are displayed when played
The Game view shows the result of
what a player would see once the content is running
Currently, this screen displays
what the Main Camera is capturing in the scene
That's what we have there
Now, let’s get familiar with the Unity engine
by starting with a simple box
Unity provides various
primitive shapes
In the Hierarchy panel, there’s a plus button
Click this button
and select Cube from the 3D Objects options
A cube game object will appear in the scene
You can name it by selecting the Cube name,
and I’ll confirm the name here
Once the cube game object appears in the Scene view,
you’ll see a white box
Since the Main Camera is focused on it,
you’ll see
the same white box in the Game view as well
Let’s learn how to manipulate the Scene view using this cube
First,
let’s navigate the Scene view
Click the left mouse button to select the game object
Select
If you click outside the boundaries, the selection will be canceled
By clicking the right mouse button, an eye icon will appear,
and by dragging the mouse while holding the right button,
you can rotate the view as if turning your head
Hold the right mouse button and move the mouse
While holding the right mouse button,
you can also use the A, S, D, W keys to move the camera
A for left,
D for right,
W for forward,
and S for backward
You can move it around
Turning the middle mouse wheel
up zooms in, and turning it down zooms out
You can click the middle mouse button
to switch to the hand icon,
allowing you to drag and adjust the view
If you lose track of an object
while in hand mode,
to find that object,
there is an easy way
You can find it easily by double-clicking
the cube in the Hierarchy
Now we have a cube game object
Now, let’s move the cube
There’s an arrow button in the Scene view,
This is activated by the arrow button
on the left side of the Scene view
Since the Move tool is selected, you can see the arrow icons appear
With this arrow icon,
if you hover over the red arrow and drag it,
you can move the object along the red axis
The red arrow becomes thicker as you hover over it
Similarly, the blue and green arrows can be used
to move the object
along the blue
and green axes respectively
You can also click the square in the middle,
clicking the green square
over here
moves it with the red and blue arrow, without the green
So it's only one side
It moves the object along the Y and Z axes
while excluding the red axis
And under there,
we have Rotate tool
This tool allows you to rotate the object
You can rotate the object along the red, green, or blue axes
by dragging the respective color-coded rings
Let's bring it back
by using Ctrl Z
Ctrl Z, Ctrl Z, Ctrl Z
And four,
Scale can resize
If you select the red cube and stretch it,
it will elongate along the red axis
Similarly, if you select the blue arrow and stretch it,
it will elongate along the blue axis
If you select the green arrow and stretch it,
it will elongate along the green axis
If you select the white square in the center,
the cube will stretch uniformly along all three axes
Next is the Rect tool,
which generates a gizmo
It's this tool right here
This tool allows you to grab the outer edges of an object and move it
However, this tool is primarily used
for adjusting
2D objects or 2D sprites, not 3D objects
It’s not commonly used for 3D objects
but is more useful in UI or 2D projects
That's what this tool does
Now, let’s look at a button
This is like a combination
of the Move, Rotate, and Scale tools,
which we have seen before
So these three are the commonly used tools
Instead of clicking each one individually,
Unity provides keyboard shortcuts for these tools
Pressing the W key activates the Move tool,
the E key activates the Rotate tool,
and the R key activates the Scale tool
They switch like this
You can easily switch between these tools using W, E, and R
Let’s use this box to create a simple chair
and become more familiar with Unity
First, I will create a new scene
Click on File-New Scene, then select Built-in,
Basic and click Create
When it asks if you want to save the current sample scene,
you can choose not to save it
We will save the new scene we are creating
This new scene is labeled as Untitled,
so we need to save it
Click on File-Save As to save it
When saving, keep in mind
that all assets used in Unity must be located
within the project folder,
the project folder right here,
specifically inside the Assets folder
Meaning,
the project we are working on
is located inside the Unity Project folder,
with a subfolder called MyProject
where the project is stored
Within this, there are various folders,
and the scene file should be inside the Assets folder
The scene we are saving
should be inside the Assets folder
Do not save it outside,
especially not on the desktop
or other locations
outside the project folder, outside MyProject
Now, in the Assets folder,
we have SampleScene,
which was created in the beginning
Let's name this folder with the asset
We will create a new scene and name it ChairScene
Now on Project Window,
in Asset,
in Scene Folder,
we see the ChairScene Asset
This Asset is where this scene is saved in
Let’s create a simple chair by first making a cube
In the Hierarchy panel,
click the Plus button and select 3D Object > Cube
We will keep the default name for the cube
Now, we will flatten the cube
to create the sitting area where someone can sit
Using the Scale Tool, drag the cube along the green axis
to make it flatter
The cube is currently a bit awkwardly placed,
so I want to center it properly in the scene
We want to move it to the exact center of the world
Right in the center
As you can see,
which is pretty self-explanatory,
by using the Move Tool
or Scale Tool,
the values in the Transform section
of the Inspector panel change accordingly
What this means is
that when we use the Move Tool, Rotation Tool,
or Scale Tool, these changes are reflected in the Transform section
For example, in Inspector,
Transform, Position,
when using the Move Tool, the Position values in x, y, and z are adjusted
Using the Rotation Tool changes the Rotation values in the x, y, and z axes
Similarly, when using the Scale Tool, the Scale values will change
This means that, in addition to using the gizmos
W, E, and R to manipulate objects in the scene,
you can also adjust these values directly in the Inspector window
You can click on the Position values and adjust them numerically,
and you can move it like this
allowing for precise movement
So the location m over precisely like this
For instance,
if you click on the z value, it will move the cube along the blue arrow,
if you click on the x value, it moves the cube along the red arrow
and clicking the y value moves it along the green arrow
This means that the red arrow corresponds to the x-axis,
the blue arrow to the z-axis,
and the green arrow to the y-axis
You can also check this through the gizmo at the top,
like a compass
This allows you to see the directions
of the x and z axes in space,
which is also confirmed by the colors
You can use these values to make adjustments
For example, if you want to move the object to the center,
back to point 0,
you can set the x, y, and z values to 0 in the Position section
This will move the object to the origin (0, 0, 0) in space
If you set the Scale to 1, 1, 1, it will return to its original size
In Unity, the position values are measured in units
Moving an object by 1 unit, for instance
If the position value is 1.78 units,
since 1 unit is 1 meter,
this is around 1.5m in reality
The Rotation value refers to the angle
For example, setting the x rotation to 2.79 degrees will rotate the object by that amount
The Scale value can be adjusted by multiplying
If you set the scale to 2, it will double the size,
and if you set it to 3, it will triple the size
Meaning, multiply by 3
For the cube, we flattened it
along the y-axis, which means
we scaled it down by 0.16 along that axis
This means we can
use the gizmos or directly modify the Transform values
in the Inspector to adjust the object precisely Setting the y-axis scale to 0.16 will compress it accordingly
I will make it precise, like 0.2
So, the position value has been moved now
The position value is 0
Since the rotation value has been changed as well, let’s reset it back to 0
Now that we have the seat part, shall we make the backrest?
The backrest can be made by simply
copying this cube and placing it on top
Let’s try duplicating the cube
We can use Ctrl + C, Ctrl + V,
or Ctrl + D,
alphabet D
Ctrl + D to duplicate
By holding Ctrl and pressing D,
the cube gets duplicated
Alternatively, you can right-click and select Duplicate
When you duplicate the cube, it may appear unchanged
because it overlaps with the original one
But if we lift it, you’ll see that it’s indeed duplicated
Now, let’s rotate it
Rotate it like so
Let’s make a slight tilt to the backrest
Like this
Now that the backrest is tilted,
let’s move on and add the legs underneath
Click the Plus button
and choose 3D Object,
then select Cube to create the legs
Place it at the origin
at 0, 0, 0
The leg will be long vertically and small horizontally,
so let’s flatten it a bit
When viewed from above, a square shape is much closer to a leg shape
Now, by reducing it by 0.15 on the x-axis
and 0.15 on the z-axis,
it transforms into a long rectangular leg shape
Now let’s move it down
to a suitable position
It can be tricky to match it precisely,
but Unity has
a feature that helps us align objects,
so that the corners can meet like so
Hold the V key
and hover the mouse over the corner,
then click on the corner of the object
and then where you want to move it
It will automatically snap into place
So do everything while pressing V
So it's all aligning perfectly
Let's duplicate it on the right too
By using Ctrl + D, we duplicate, move,
and use the V key
to snap it into place on the corner,
move it to that corner
It snaps right on
You can let the V key go
Done
Let's move the other legs too
Ctrl D
Move
V to snap
Same thing here
Ctrl D
Move
V to snap it on
And that was easy as that
In this way, a simple chair shape has been created
Now, you’ll be able to handle Unity with more flexibility
Let's summarize what we've learned today
Exploring Unity, Installing Unity Unity engine structure, component set, game objects, game object sets, scenes, scene sets, projects
Unity Production Process Prototyping Implementing with basic shapes without waiting for the final art assets Simultaneous work Verifying
Alpha: Version after completing the appearance verification Beta: Version after completing optimization Install Unity 2022.3.50f1
Unity Interface and Object Handling Scene View: Space for placing game objects Hierarchy: List of game objects in the scene view
Inspector: Managing settings of game objects Project: Asset management Game View: Space for confirming the actual functioning results
Handling Objects Insert basic shapes: Hierarchy + 3D Object Change game objects with Move Tool, Rotate Tool, Scale Tool, Rect Tool
Modify game objects by adjusting the Transform values in the Inspector V to position the gizmo, drag and drop