How to convert an Unreal Engine 5 Blueprint-only project to a C++ project using command line and compile it?

I’m looking for guidance on how to convert a Blueprint-only project in Unreal Engine 5 to a C++ project using the command line. Also, how can I compile the project afterward? I want to put these into a bat file.

Any help or suggestions would be greatly appreciated!

Blueprints are automatically compiled into c++, however there is an option if you right click on a BP class to “show generated header” or something like that it automatically makes the .h file

I mean I want to convert the blueprint-only project into a C++ project. In the editor, I can do this by adding a new C++ class using the toolbar, but now I want to achieve this via the command line instead of opening the editor. And then compile the project using command line after this.

Do you mean like launch the project from visual studio?

I solved the problem now. It’s actually just one line of command like this


D:\UE_5.3\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe -projectfiles -project="D:\BlueprintTrans\MyProject\MyProject.uproject" -game -rocket -progress

I created some source files under the directory and this command works. Thanks for your reply! :smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.