Hello, I am a programmer of 17 years
and have been a full time professor of NEOWIZ Games
and currently working in KRAFTON, Juhwan Kim
Now, I will start Unreal C++ basics lecture
The objective of this lecture is
gaining basic knowledge
to using Unreal Engine C++ for programming
And I will also give some basic explanation about Unreal Engine
There will be 4 lectures
and on the first lecture
as the basic grammars of C++
we will learn installing Visual Studio and Unreal Engine
their settings
creating projects for coding
and actors
and outputting logs using Unreal Log
Second lecture
will contain basic C++ grammars including
variables, functions, conditionals, iterations, and expressions
In the third lecture
we will learn what's left in C++ like
array, pointer, reference, class, object-oriented programming, and polymorphism
On the fourth lecture
we'll recap on C++'s inheritance structure based on what we've learned
and learn about Unreal's reflection system
represented with U Property and U function
Lastly, we will briefly recap on
actor's life cycle which is the object that you will
get to use the most and most generally in Unreal
Installing Unreal Engine and Visual Studio
Then, I will start
the first lecture, C++ basics
On this lecture, we will install Visual Studio of Microsfot
and learn about it
and install Unreal Engine
and learn about it linking it to Visual Studio
The lecture will be based on UE5
and Unreal Engine is, as you might know
an AAA engine usually for making games by Epic Games
It would be good if you have Unreal Engine installed
but if you don't
go to the URL in the screen
and let's install Unreal Engine
First, go to Unreal Engine website
through the URL I just showed you
You will see this Unreal Engine download page
I'm not sure what the latest version would look like
but usually, once you go to their website
there will be a download button on the left corner
you can click that to download it from web
This is the Unreal Engine download page
and when you click on the blue button on the left
the download will begin
Before downloading, if you have an Epic account, you can log in
and if not
you can sign in and log in
You can also log in using
other accounts like Google or Apple
Log in and install the exe file
and once it;s done
a launcher that will
run Unreal Engine will start running
and the launcher's screen looks like this
Here, go to Unreal Engine
and on the library tab
Unreal Engine won't be installed like this
Then once you install Unreal Engine
comparing the two screens
this screen shows when Unreal Engine isn't installed
and this shows when it is
The run button on the right top corner
let's you know what version of Unreal Engine is installed
This screen shows where Unreal Engine 5.3.2 is installed
and the library shows a run button with Unreal Engine 5.3.2
You can have various versions of Unreal Engine installed
and in that case
several ones of the the run button in the middle
with a U mark will show
The projects in the bottom
won't show up when you first download it
but once you create projects
it will show a list of your projects
with a screenshot
If you installed Unreal Engine
the editor that can edit C++
is called IDE
which is Integrated Development Environment
You have to install Visual Studio 2022
of Microsoft
For Visual Studio of Microsoft as well
go to the Microsoft website
which you can follow the URL shown
you'll see the download tab for Microsoft's
Visual Studio Community
Click on the download button on the bottom left corner
and the installer for Visual Studio will be installed
Visual Studio Installer looks like this
Now, Visual Studio 2022 is already installed
so it says that it's available for use
but if you don't have it installed
nothing will show up there
and you can install Visual Studio 2022
When you click on the install button, this screen will show
and just check on the
Unreal development mark
game development using C++
and click on the install button on the bottom right
then it will start installing
The time it takes to install it will differ from computer types and internet circumstances
but it will usually take from 20 to 40 minutes
Once you've installed Visual Studio
assuming that it's the 2022 Community version
Visual Studio will automatically start
and this screen will show
It says Visual Studio 2022 open recent files
and the menu on the right
is the menu that you can use to make projects
on Visual Studio
and on the left, when you create a project
the recent files and projects will show there
Now there's nothing
so you can click the create new project on the right
to create a new project with Visual Studio
Again
installing Visual Studio 2022
takes the steps of going to the Microsoft website
clicking on download to download Visual Studio Installer
and once you run that
it will show a Visual Studio 2022 install menu
and with that, you can install Visual Studio
You will need to check on the
box for Unreal Engine in the process
Generating actor and outputting log
Then let's learn about
creating a C++ project with Unreal Engine
Once you run the Unreal Engine launcher that you just installed
you'll see this screen
When you click on the run button on the top right
or the run for this version in the center
this project setting screen will show up
On the left of it
it says recent projects
Those are the projects recently created
There are games, films, videos, architecture, automotive
but we will select games tab
and templates will come up in the middle
Templates are pre-made basic settings
but we'll select blank
and it will show an empty tiled floor on the right
which is a screen for creating a new empty project
Under that there are blueprint and C++
click on C++
and you may leave other settings as is
If you check on the starter contents the basic contents will be included
so you just need to click on that and then create
On the bottom it says project name
which is just my project
You can choose the name for your game or project
Let's just keep it as is for now
Once you click on the create button
after a while
Unreal project will be opened through Unreal editor
On this Unreal editor screen
we have world view on the left
and world outliner in the middle
and details on the right
Now let's create a project in this Unreal editor
I will tell you in two steps
First, making an actor and writing the C++ code
and the second is outputting a Hello world log in the log tab
There are various ways to create an actor
but we'll use C++
so from the top menu
select create C++ class
Once you do that, this screen will show
You can select what class to create when making a C++ class
now, we'll create an actor
You can see character, phone, actor
but first, we'll go for an actor
You can name your actor
and keep the public/private as is
Just give it a name and when you click on create class
actor.header file and actor.cpp will be generated
It might vary per settings
but Visual Studio might start being linked
and show this screen which is
a log file during compiling
called live coding in the Unreal screen
Let's say that Visual Studio did start
and try outputting log
If the installation was done properly
as soon as you created the actor
Visual Studio will start and show this screen
If this source screen doesn't show up
you can select the file on the solution explorer on the left
If the Visual Studio tab doesn't automatically pop up
find the MyActor.c++ file that you just created
from the content browser on the bottom center
and double click on it which will open Visual Studio
These are the MyActor files
and there are two, header and cpp
First, go to the cpp file
which has the actions the actor will do
and on the 25th line, under supertick function
we'll write a code
We didn't learn C++ yet
so to give a brief explanation
tick of MyActor is
a code that is practiced every period, for every tick
So we'll write a log there
and have messages be output every tick, for every updated frame
Type the following on the 25th line
UE_LOG(
LogTemp, Warning, TEXT ("Hello World!")); just as written on the screen
To explain this code briefly
when you develop a game you need to do logging
which is leaving records of if a function
is running well or not
and stuff like debug messages
In this case, to see if the code is written properly and to test
we'll put the string of 'hello world' in
Usually if you go to Unreal editor, it will be automatically compiled
but you might do it manually
If you press Ctrl + Alt + f11 in Unreal editor
the code will be compiled like this
and Unreal Engine will be updated
Once the compiling is done
you can go back to Unreal editor
and as I told you when doing the double click
drag the C++ class in the content browser
under the world outliner in the middle
into the view which is
the 3D screen with tiles
Once you do that
it looks like nothing has been added in the world screen
It doesn't show up
because there are no content for the actor
like physical mesh or renderer
but in the world outliner in the middle
you'll see that my actor has been added
If my actor is properly added to world outliner
you can click on the green play button on the top
and Unreal editor will run a game project with an actor
Now, there's nothing that we've created
so we can only move the camera
but through the code that we made
on the bottom left
there are 'hello world' logs
I explained creating an Unreal project
Follow this example step by step
and the objective is installing Unreal Engine
and Visual Studio
and outputting messages on the Unreal Engine editor log tab
So as you saw
if the yellow 'hello world' is output on the bottom left
you've succeeded in writing
a very basic C++ project with Unreal
Let me tell you about the following lectures
To program with Unreal
You wrote a log just now
but to program using C++ with Unreal
you need to know C++ well
So starting from variables for data
I will explain C++, an object-oriented
program briefly
C++ is a very complicated and big language
that would take about a year
in academies or colleges
but I'll have only what's needed
for Unreal programming
Let's wrap up what we've learned in this lecture
First, we installed Unreal Engine 5 from its website
and Visual Studio 2022 Community as well
We created a C++ project
and wrote a C++ code to output 'hello world' log
Thank you for listening
Installing Unreal Engine and Visual Studio Unreal Engine downloading link https://www.unrealengine.com/ko
Visual Studio downloading link https://visualstudio.microsoft.com/ko/vs/community/
Creating actor and outputting log Creating projects Select Actor from New C++ Class and write a name and click Create Class
Appears linked to Visual Studio tab
Outputting 'Hello World' log Write UE_LOG(LogTemp, Warning, TEXT("Hello World!")) under Tick function
After compiling, click and drag MyActor from Content Browser to scene Check string being output on Output Log tab
The End