Hey Guys, I am using the below code snippet in a Plugin Module and I am getting this error. The same code snippet if I use in an Actor class there are no errors. Can someone please tell me why is that?
Thank you
UWorld* const World = GetWorld();
FString MapName = GetWorld()->GetMapName();
MapName.RemoveFromStart(GetWorld()->StreamingLevelsPrefix);
UE_LOG(LogTemp, Warning, TEXT("%s"), *MapName);
error C3861: ‘GetWorld’: identifier not found