Editing and adding code

After opening Visual Studio, you will have the base code for the header file and the sources file of the character class we just created. This base code is not essential; you can edit it or remove the majority of it, but for our game's purposes we will keep it.

The header file will usually look like this by default:

Editing and adding code

As you can see, header files start with including the character header file from the Unreal Engine game framework, and then include the generated header of the newly created class we just made.

An Unreal Engine class should have the macro UCLASS above it, otherwise you will probably get a compiler error.

The class, ...

Get Mastering Unreal Engine 4.X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.