"Generate Native Code" Greyed Out

I am trying to make a simple C++ character class with the default mannequin mesh, and created it in blueprint so that I could edit it in the editor. However, following the steps mentioned here, I could find the option but it is greyed out, and I cannot select it. How would I convert this blueprint character class to a C++ class?

The reason might be that you created blueprint project at the very beginning and no C++ sources were created for your project (yet). This is how my “File” menu looks like after creating empty, blueprint based project and having one, empty new blueprint class (BP_SampleCharacter) based on the Character class.

There is no “Developer” menu under “File” and I cannot see conversion to native code at all. I was able to fix it by creating empty, new C++ class. This triggered everything what UE4 editor needs to support C++ classes in this project.

As you can see after creating empty C++ class I have now “Developer” category available under the “File” menu with “Generate Native Code” option available.

I don’t think this was my problem, because I started with an empty C++ project, added a blueprint, and wanted to convert that blueprint to C++. I can see the “Generate Native Code” option under developer, it is just grayed out for me.

Try to compile the blueprint first.
Then “Generate Native Code” shouldn’t be grayed out