GetWorld() showing as a error in VS, but compiles fine?

As the title says, I have a red squiggly line through GetWorld() in my code, but it compiles and runs fine?

This isn’t the first time this has happened, but it’s really annoying and makes learning a lot harder. I can never tell if I really made a mistake or if its another VS mistake instead.

Is there a easy fix for this?

I’m running on Windows 10 with VS 2017 and Unreal 4.19

include “GameFramework/PlayerController.h”

#include “Engine/World.h”

https://answers.unrealengine.com/questions/670373/pointer-to-incomplete-class-type-is-not-allowed-2.html

Privacy & Terms