GetWorld() stop working

It’s worked just fine. And just “PawnTank.cpp(40): [C2027] use of undefined type ‘UWorld’.” On part of code that worked perfectly before “MoveDirection = FVector(Value * MoveSpeed * GetWorld()->DeltaTimeSeconds , 0 , 0 );”.

have you included Engine\World.h in the class?

It’s worked without it before.
So why it’s worked without it before, and not working now? Was it some spirit of phantom “#include Engine/World.h” or what?

Did you upgrade the engine? Generally you do need these includes.

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

Privacy & Terms