GENERATED_BODY() issue

Please see pics!

I am using Visual Studio 2022, I had the same issue with Visual Studio Code.

I am trying to add an #include in my header Grabber.h, by doing so the GENERATED_BODY() function will move from line 12 to line 13, and the UClass from line 9 to line 10 creating the following issue see pics. The program will generate compiler errors if those lines are moved down.

Do you get any errors compiling?

I do get errors when compiling :frowning:
if the GENERATED_BODY() line code moves from line 12 to 13.

I made it work by adding my #include line under the #pramgra once code line

Also, if I add my #include in line 9, GENERATED_BODY() is not recognize by the compiler, i.e. I get compiling errors…

Would be helpful to see those errors.

Well After… compiling in VS with the error, now I get this error when opening my UE editor

B

Pressing yes to rebuild now does not work

AA

And Now (From Source) rebuilding it from VS gives

Yeah! :frowning: My project is now completely broken!!!

The course calls to use UE 4.26 for the content Medieval Dungeon content

Ignore the error list, what is the actual output of compiling?

Dan Thank you for the tip “what is the actual output of compiling”, I found the compiling error and I fixed it. Missing c++ lines???
I got my project working, it was missing code c++ lines “just gone?” and I had to reconfigure a couple of my blueprints for some reason.

Anyway the issue GENERATED_BODY() remains. I need to be extremely careful when compiling from VS, If GENERATED_BODY() is generating an error and I compile my cpp files, it will fatally crash my project :bomb: :bomb: :bomb: :bomb: :bomb:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms