Adding a C++ class doesn't seem to be recognised in editor

Hey all,

If I try and add a C++ class to my project, it says it successfully creates one and is visible in the projects source folder, however it says the module needs to be recompiled for it to be seen in the content browser.

When I then re-open the project I get the message saying the ‘projectname.dll was built for a different version, would you like to rebuild it?’, if I click yes it says it fails and I should try rebuilding from source manually.

If I go to generate the Visual Studio Project Files, I get an error and the only way I can open my project again is I have to delete the Intermediate and Saved, then open it. I can then generate the VS files.

If I build from source, the C++ class still doesn’t appear in the content browser though.

This seems to happen with every project too. I’m using Unreal 4.15.3 and Visual Studio 2015.

Thanks

I tried to add a C++ Actor to my Blueprint project and got the same problem in 4.17.2 (Visual Studio 2015 selected as compiler). However, removing the Intermediate and Saved folders fixed the problem for me! So… thanks for helping me with MY problem. Hope you figure yours out, soon.

Haha you’re welcome :slight_smile:

Hey.

In the end you were able to compile and run the project right?
If so, what is a parent of your class?

Try deleting all generated folders in your project directory. For example, .vs, Binaries, Intermediate, Saved, Source. I know you said you tried with just Saved and Intermediate but I have had a similar error before where I needed to delete all folders and then I could rebuild. I see that you are using Visual Studio 2015, you could try upgrading to 2017 if the problem persists. I wouldn’t think that would be a problem but who knows.