Empty C++ class file does not appear after creation and Visual Studio compile

Hi,

Not sure if this is my lack of knowledge about C++ or the engine. However, today I pulled my hair out over the fact that when I try to create an empty C++ class from within the editor, it never appears in the C++ Classes folder in the editor, however it does appear in the Visual Studio project and on the disk inside the source folder. I closed everything, tried to regenerate project files, all succeeded but the file never showed up in the editor.

I then had the editor create another class with the parent being Actor, and this file did show up in the editor as it should.

Is this a bug?

Edit: I also wanna note that when I try to create the empty class again with the same name, the editor knows it exists and says I can’t use that name

1 Like

Hey Fexception-

This is not a bug and is working as intended. The reason an empty class does not show up in the editor is that it is not exposed to the editor. For the editor to recognize a class, the class must be declared with the UCLASS() macro. When you add a class that is based on another class, the UCLASS() macro and other necessary boilerplate is added by default, so the editor immediately picks up the added class.

Cheers

2 Likes

Thank you!