Typically if Unreal fails to build a new class it means Visual Studio will fail as well. But VS provides more info on the issue. Right click on your project in Visual Studio and hit build. After building fails paste the info from the VS output log.
Did someone find a solution for this? I’m new to UE4 and AirSim, I tried to create a C++ class on my Blocks module and I got “Successfully added class ‘MyActor’, however you must recompile the ‘Blocks’ module before it will appear in the Content Browser. Failed to automatically compile the ‘Blocks’ module”.
The .h and .cpp are created in a Source folder within Bocks and AirSim, but nothing appears in the “Content” folder…
I have been having a lot of trouble with creating c++ classes as well. Whenever I create an actor class from the class wizard, I get the same hot reload error. I tried recompiling it again in VS but I still get errors in my VS error list. I do not know how to fix this issue and I have been frustrated with this issue for the past 3-4 days. I have attached photos of the errors I get from VS and output log and error message I get from unreal engine. Someone please help.
I got the same error message from Unreal Engine editor when I try to create a class in a custom subfolder. Mainly, I saw neither my subfolder nor my created class in UE editor (But in VS solution viewer it was ok).
As Acnologia_Drag said, I checked in the .h and .cpp files the inclusion path of the header and I were able to corroborate that .cpp file includes wrong path (automatic class code generator added subfolder path and caused double folder path inclusion, for example real path was “src/custom/customclass.h” and path generated was “src/custom/customclass.h”). Just, I deleted that wrong file path from .cpp file, recompiled project from VS and Unreal Engine editor works fine (i could see right subfolder with class inside).
I post this if somebody else got the same message following the same steps and want to fix it.
I had a similar error. When adding a class through the editor, without specifying public-private, but not in the root directory, the build began to fall.
Code generation adds /folderName to ClassName.h in the include section of the .cpp file. After deleting /folderName, the project builds normally again.