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.
How to delete some elements correctly when deleting an array loop?
How does TextureRenderTarget2D get TArray<uint8> type data?
How do I set a material as a post-processing material?
Why does the REMOVE method of map container remove elements have memory leaks?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How does TArray loop correctly remove elements in blueprints?
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 |