Header file inclusion error

Every Time I import Header Files in The .h file of the created class, the following errors come up. The code compiles but it disables autocomplete and rest. Please explain what i am doing wrong.

The reason for this is that the GENERATED_BODY() macro and the NewActorComponent.generated.h header files are used by Unreal for a lot of behind the scenes magic. Quite a bit of code is generated there for you to make your life easier.

The errors you’re witnessing stem from moving the macro. If you included a new header in an empty line, that wouldn’t have happened. I suppose what’s happening is that this change overwhelms the intellisense system that is used for auto correction and error highlighting.

To fix it, you compile and reopen the IDE. When the new and updated secret sauce is in place, intellisense will pick it up correctly.