Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/World.h |
Include | #include "Engine/World.h" |
Syntax
class FScopedLevelCollectionContextSwitch
Remarks
A helper RAII class to set the relevant context on a UWorld for a particular FLevelCollection within a scope. The constructor will set the PersistentLevel, GameState, NetDriver, and DemoNetDriver on the world and the destructor will restore the original values.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FScopedLevelCollectionContextSwitch
(
const FLevelCollection*const InLevelCollection, |
Constructor that will save the current relevant values of InWorld and set the collection's context values for InWorld. | |
![]() |
FScopedLevelCollectionContextSwitch
(
int32 InLevelCollectionIndex, |
Constructor that will save the current relevant values of InWorld and set the collection's context values for InWorld. |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
The destructor restores the context on the world that was saved in the constructor. |