Duplicate of UE-7578
Add Code to Project fails to add a class to the project. The project can't be reopened until the classes are manually removed and the project is recompiled. The following errors occur when using Add Code to Project in a Blueprints project:
Failed to add class MyAIController. Failed to compile newly created game module.
From the Compiler Log:
Error D:/4.7_Projects/AddClassBug2/Source/AddClassBug2/MyAIController.h(11) : Error: Superclass AIController of class MyAIController not found Error Error: Failed to generate code for AddClassBug2Editor - error code: OtherCompilationError (2)
Displayed on the Add Code window:
The name MyAIController is already used by another class.
When attempting this in a code project, the first error instead says:
Failed to add class MyActor. Failed to automatically hot reload the 'MyProject' module.
Note: other classes seem to work fine, but once the first class fails creation any other classes will also fail.
Reproduced in 4.7.2 binary and Main (//depot/UE4/Promotable-CL-2478413)
1. Open a new blank Blueprint project
2. File > Add Code to Project
3. Show All Classes > Search for AIController > Next
4. Use a unique name (MyAIController is fine) > Create Class
Results:
Failed to add class MyAIController. Failed to compile newly created game module.
From the Compiler Log:
Error D:/4.7_Projects/AddClassBug2/Source/AddClassBug2/MyAIController.h(11) : Error: Superclass AIController of class MyAIController not found Error Error: Failed to generate code for AddClassBug2Editor - error code: OtherCompilationError (2)
Displayed on the Add Code window:
The name MyAIController is already used by another class.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.7.2, 4.8 |
Target Fix | 4.8 |
Created | Mar 16, 2015 |
---|---|
Resolved | Mar 17, 2015 |
Updated | Feb 5, 2017 |