Unreal Engine and C++

C++ in the Unreal Engine

Caleb Watters July 19, 2019

Recently I have spent some time putting my newfound C++ knowledge to use within the Unreal Engine. What I have found, however, is that much of the code written within the Unreal Engine is fairly specific to that framework. Much of my time working with it thus far has been to regularly refer to the engine code to understand the class structure of those that already exist. Unreal’s built in class hierarchy (Actor-> Pawn -> Character). Understanding the pre-existing classes and the necessary evaluations when creating new classes, ie: building your class off the correct branch in the hierarchy.

Here is an example of a C++ header file for a basic pawn class:

Blog Image 3

And here is it's implementation:

Blog Image 3

Aside from that there is much that you can do within the Unreal Editor that is completely separate from building C++ classes. From building different environments through basic shapes or imported meshes, to landscape sculpting and most importantly blueprinting.

Blog Image 3

Blueprinting is an environment where you can take advantage of both C++ classes and their methods without writing any code. It is a two dimensional visual editor where you connect various nodes to build an intended result. The example I tend to use when expressing the simpler implementations is that when hard coding it is pretty straightforward to program a door opening and closing, however if you build on top of that with blueprint, you can give the door a much more natural movement, closer to that of a swing as opposed to a snapping movement.

In conclusion, the Unreal Engine is a very powerful tool if know how to use it, however it does have a pretty steep learning curve. To anyone interested in learning more about it, there are a ton of great resource on Udemy on C++ in Unreal, Blueprinting and also Blender if you're looking to do some 3D animation as well.


Caleb Watters

Full Stack Software Engineer with an interest in cloud-computing and game development, but spending most of my time in the world of web development these days.