GetWorld() classtype "pointer-to-incomplete" is not allowed

Hello,
my project doesn’t build, it says GetWorld() classtype “pointer-to-incomplete” is not allowed.
I can’t find the mistake. Please help.
Thank You

I have a similar problem. VS doesn’t recognize GetWorld() call so it’s underlined in red, but my project builds. For me it appears to be a intellisense problem. But it makes coding a lot more inconvenient. Does anyone have a solution for intellisense?

#include "Runtime/Core/Public/Math/Vector.h"
#include "Runtime/Core/Public/Math/Rotator.h"
#include "GameFramework/Actor.h"
#include "GameFramework/Controller.h"
#include "GameFramework/PlayerController.h"
#include "Engine/World.h"

use these header files

Privacy & Terms