/Engine/Source/Runtime/Engine/Classes/Engine/World.h
A helper RAII class to set the relevant context on aUWorldfor a particularFLevelCollectionwithin a scope. The constructor will set the PersistentLevel, GameState, NetDriver, and DemoNetDriver on the world and the destructor will restore the original values.
class FScopedLevelCollectionContextSwitch