That should go away when you switch over to “forward declarations” a little later in BattleTank; for now, at least IntelliSense will now be able to path through GetWorld()-> to suggest member functions. I share your frustration though. That GENERATED_BODY() red squiggly ought not to cause any actual compile errors though.
Include: #include “Components/ActorComponent.h”
Because you may be using UWorld *UActorComponent::GetWorld()
and for intellisense it requires UActorComponent: header.
I am getting the same error too, it compiles just fine but now I need to make the AI tank aim at my Tank so the GetPlayerTank dosent works properly , any suggestion how you fixed it
It’s been so long, I don’t remember. I don’t think I got that far in the course. Did you try including #include “Components/ActorComponent.h”? If that doesn’t work, you could try #include “Engine/World.h” or both.