Failed to add Class, name already used

I’m new to the unreal engine. But I create a new project with a blank template hoping I could add classes as I needed them. No matter what I name my class (gibberish even) I get an error message saying "failed to add class [className]. Failed to generate project files. Then I get this:

Is this a bug?

  1. Create New Project with blank template.
  2. File → Add code to project → Chose any parent class and they all fail.

Visual 2013 professional. But I also have 2010 installed. Not sure if that creates conflicts.

Thanks I’ll try removing it and reporting back.

Hi Recheej,

Can you walk me through the steps you took to create the class? It will help me to try and re-produce the issue on our end.

Thank you,

Hi Recheej,
What version of Visual are you using?

I had to remove my 2010 express, UE4 kept trying to use it even after being told not to.

That still did not work unfortunately,

There are two ways this message can occur

  1. There is already a class in memory with that name.
  2. There is a .h file in your classes directory that has that name.

It could be that the file is created when you hit the create button, then it is finding that file on disk.
Does fwqareafawfa.h exist in your ProjectRoot/Source/ProjectName/Classes folder?
When you hit the create button, is there an error dialog that happens first before showing you the “class name is already in use” message?

@recheej

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

I am getting the same message when trying to add new classes to shootergame project.
My first error message comes up as “Failed to add class [classname]. Failed to automatically hot reload the ‘ShooterGame’ module”.
Then the same error message that you linked to comes up.
Afterwards, the class itself is created and present in the VS project, but not in the UE4 editor.
If i try to build in VS, it fails complaining that the new .cpp file cant find the .h file which is clearly there.
Restarting editor doesnt work.
Clearing all local generated files (intermediate, build, VS project files etc) doesnt work.

Using the prebuilt binary 4.7.3 engine.
VS2013 Ultimate

Hi sbot1101,

This post is quite old and didn’t have a proper resolution. For the best chance at an answer, would you mind posting this as a new report in the C++ section?

Cheers,

TJ

ah i thought it said 21 Mar 2015 for some reason 0.o derp