"New C++ class" in plugin folder does not work as expected

When trying to add a c++ class to a plugin, it gets added to the main game module instead.

The expected behaviour when adding a “New C++ class” when inside a plugin folder would be to add such class to the plugin’s main module.

Steps to reproduce:

  • Activate “Show Plugin Content” under “View Options”.
  • Navigate to a C++ plugin folder in the left navigation panel.
  • Right click inside the folder and select “New C++ Class”
  • Follow the wizard instructions.

The class is created in the main game module instead of the plugin.,

Hey ClaudioFreda-

This is actually working as expected. When you use the “New C++ Class” option through the editor it adds the new class to the project you are in. The built in plugin folders are not meant to be edited however if you are trying to add new files to a custom plugin the best way to do so is directly though Visual Studio inside the plugin folder. After adding the new files you will need to right-click the .uproject in the game folder and Generate Project Files for the new files to update with the project.

Cheers

Note that in more recent releases you can now select the plugin in the class creation wizard. (I’m on UE 4.14 - probably still an issue if you are locked into 4.10.)