How to get UWorld* from a background thread?

Hi,

I’m developing a TCP client to connect to a 3th party server. I’m using the networking classes from UE4 (FSocket) and for receiving the packets from the server I’m running a background thread initialized by a non-game class (I mean, the class doesnt inherit from UObject).

When a packet arrives I need to get a reference to the actual UWorld in order to get the actual playing level, set animations, spawn actors, etc.

As far as I could find here in the forums, the suited method for that would be GEngine::GetWorld(). GEngine should be a static class that lives from the start of the first level to the end of the game and its GetWorld method should return the actual playing UWorld. Could anyone confirm that?

Also, when calling GEngine->GetWorld() from that recv thread I always get a nullptr. Does anyone have any idea why is that happening?