Compiling a C++ Project UE5

Chris Didier
2 min readMay 29, 2022

We are going to be creating our first C++ class in our project.

Let’s make sure Visual studio is our default code editor. Go to Editor Source Code > and your version of Visual Studio for us it’s 2022. Once selected you will have to restart the editor.

Now we are going to create our first C++ class. To do that we are going to go to Tools>New C++ class. Where we will see this screen.

We want to create an actor. We are going to name it MovingPlatform and click create class when complete.

We must rebuild our project first before we can continue. We must use our IDE and compile first. Then we will be asked if we want to edit our code now. If you click no nothing will change and you will remain in the editor. If you do go to tools>open visual studio code.

In Visual Studio Navigate to our MovingPlatform.

We next will select build>build solution and you can launch the project from here using the run and compile option as well. This will rebuild our game in C++.

Now back in the Unreal Editor and go in the content folder you will see there is a C++ folder that contains your MovingPlatform class. This actor can be dragged right into our level.

We have now created our first successful C++ class.

--

--