The process of converting Blueprint assets to C++

I have a project I’ve been working on for a few weeks. So far it’s just a framework for executing some custom game functionality (wow, that’s vague) consisting of about 6 to 7 Actor blueprints, a pawn, controller, game mode and a few UMG widgets.

The further I get in this, the more I think “I should be doing this in C++ instead”. I’m a programmer with experience in C++ so there’s no real reason why I shouldn’t be using C++ except that I haven’t done it in UE4 and don’t really know how it all fits together. These questions are not really about how to program C++ for UE4, I can see there’s a lot of resources already available for handling that. They are more general questions about C++ coding and the conversion process from Blueprint.

Firstly, I don’t know the difference between a “Blueprint” project and a “C++” project. It seems you can add code to Blueprint projects so what’s the advantage to starting a C++ project? Is it that the editor source code is also available in case you want to change that? Modifying the editor seems like something people wouldn’t need to do much at all. I guess the core engine is available to be edited too. I’m not sure if I should look into starting a completely new C++ project or just adding code to replace my blueprint assets in the Blueprint project.

Secondly, is it easy to use Blueprint nodes as a reference when creating code assets? I’ve done a lot of work in blueprint already and some parts were very finicky to get just right. Looking through the C++ code documentation, it looks like there’s a function available for every blueprint node so I shouldn’t run into issues where something is available in blueprint but not C++. I’ve actually heard people mention they like to prototype things in blueprint prior to coding it in C++.

Lastly … should I be looking to use C++ instead of blueprints? I’m not sure of the advantages, but I imagine there’s enhanced functionality and improved performance. Any downsides (aside from needing to type code instead of click nodes)? From the early stages that my project is in, would it make sense to evaluate this conversion now?

If you have any helpful advice on this or general thoughts, I would greatly appreciate it.

First Question - Starting new c++ project == Adding c++ to existing blueprint project

Second - (I think you are already doing this) you can right-click and choose “go to code definition”

Third Question - If you know c++ and have a desire, then augmenting your BP efforts with a little c++ is an outstanding idea.

Happy Coding

Thanks for the response, sounds like converting to C++ is the way to go. Hopefully it goes smoother than the original creation of the blueprints (lot of moving parts).

So then what’s the difference between starting an empty Blueprint project vs starting an empty C++ project? Just that you need to build the engine first?

I am not sure I understand this question, but I think the difference between starting an empty Blueprint project vs starting an empty c++ project is you start with almost only C++ classes in the C++ project and almost all Blueprints in the Blueprint project… Not sure though and would love to be corrected. :smiley:

A blueprint project don’t need Visual Studio installed, the Blueprint compiler is built in.

Learn how to get UObject from assets and you gonna be fine; learn about the UProperty reflection system.

It’s your own choice; I personally don’t like to “read” blueprints.

If you know the API very well, you won’t need to use Blueprints. If you don’t then using Blueprints together with C++ is faster.

There is literally no difference - other than it creates a c++ default character for you or something.

You can still access the engine source within VS from both.

No need to use a custom engine build to get access to source - it is included in the binary engine from the launcher too (historically referred to as Rocket).

If you have an existing BP project, just choose add c++ class from menu - that is all you need to get started.