Hi, I have trouble creating an actor class in my plugin. See the code in the image below. I keep getting the compiler error “this declaration has no storage class or type specifier” and don’t know why. Can you give me a hint?
EDIT: When I remove UCLASS() I receive exactly the same error for GENERATED_BODY(). Maybe he does not accept these macros in plugins?
You not include UHT generated header file which also include engine core headers which decleratiin of UCLASS() (which is empty and added just compiler pass it), so include:
#Include ProceduralMeshActor.generated.h
Plugin module works exacly the same as game module and as any other engine module, same code should work regardles if its in plugin, game project or engine code
Hi , thanks for your answer. Unfortunately, ProceduralMeshActor.generated.h is not found when I include it. I added ProceduralMeshActor.cpp and ProceduralMeshActor.h manually (not via the feature in the editor). Can you tell me how to force the compiler to create the *.generated.h file?
EDIT: Okay, I had to regenerate the Visual Studio Project from the editor, not the header file is generated and the macros are accepted! Thanks a lot!
Hey there, I am having the same error. The strange thing is, I have the .generated.h file included and it does compile when I hit compile inside the UE editor, while it throws the same errors as above when I want to build it from Visual Studio.