Created a new blank plugin, trying to add #include "filename.generated.h" to the header of filename.h - I get this error “Can’t open source file filename.generated.h”
The file should be generated automatically, but for some reason it doesn’t.
UE version 5.0.3
I think there used to be a bug similar to this. It was caused by the wrong file path and something to do with the intermediate folder. I don’t remember how they fixed it though.
Hello @GenericNickname7! I recommend you try to Rightclick on .uproject and Generate VS project files, I haven´t tried to look for this option on unreal engine 5 myself but I assume it´s available. Hope that helps!
Hi @Gamingkaos25 and @Detach789, thank you a lot for your help. Unfortunately, none of the proposed solutions worked. Do you know anything else that could solve this?
This should not compile for another reason. DLCCheck is not prefixed with a U “class TESTPLUGIN_API UDLCCheck” which is required when inheriting from a UObject.
Now the file should be called DLCCheck.h and the class UDLCCheck. TESTPLUGIN is the module name this file lives in.
I assume the project does not build and that the error is a build error. If it’s only an intellisense error you can ignore it, because it’s usually intellisense just failing. You can avoid that by setting the error filter to Build Only: