Tip: Make sure that you create a C++ project and not a Blueprint one

Here is a tip which I am posting because I fell into the trap myself. In the lecture Mike creates a project in the UE4 Editor. When you go into the New Project tab, there are two sub-tabs one for Blueprint and one for C++ project templates. Mike switches to the C++ tab and goes ahead, however the first tab (that you end up in by default) is for Blueprint. If you are a little careless and create an empty project in Blueprint that you will quite happily end up with a working project. Note that in Blueprint the empty project icon is labelled ‘Blank’, while in C++ it is ‘Basic Code’. The only initial indication that you are in a Blueprint project is that the default source editor is Visual Studio, which may also be the case for C++, however the difference is that even after you have changed the edit preferences you cannot start Visual Studio Code until after you have added a C++ class to the project. After that things seem to work fine and you can merrily continue on with the course until you reach the lecture ‘Inherit Game Mode Blueprint’ at this point you will discover that there is no GameModeBase C++ class. When I found this I spent a good deal of time scratching my head wondering what was going on, until I finally realised my mistake. Fortunately you can add a GameModeBase C++ class manually via the Add New => C++ Class option in the Content Browser and this will get you going again. Hopefully at this point there will be no further problems due to creating the wrong project type.

2 Likes

There’s virtually no difference between a blank C++ project and a blank BP project.
The C++ comes with a blank game mode derived from GameModeBase. You could just use GameModeBase for the blueprint instead and it would be the same.

Privacy & Terms