A helper RAII class to set the relevant context on a UWorld for a particular FLevelCollection within a scope. 更多...
#include <World.h>
Public 成员函数 | |
| FScopedLevelCollectionContextSwitch (const FLevelCollection *const InLevelCollection, UWorld *const InWorld) | |
| Constructor that will save the current relevant values of InWorld and set the collection's context values for InWorld. 更多... | |
| FScopedLevelCollectionContextSwitch (int32 InLevelCollectionIndex, UWorld *const InWorld) | |
| Constructor that will save the current relevant values of InWorld and set the collection's context values for InWorld. 更多... | |
| ~FScopedLevelCollectionContextSwitch () | |
| The destructor restores the context on the world that was saved in the constructor. | |
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.
| FScopedLevelCollectionContextSwitch::FScopedLevelCollectionContextSwitch | ( | const FLevelCollection *const | InLevelCollection, |
| UWorld *const | InWorld | ||
| ) |
Constructor that will save the current relevant values of InWorld and set the collection's context values for InWorld.
The constructor that takes an index is preferred, but this one still exists for backwards compatibility.
| InLevelCollection | The collection's context to use |
| InWorld | The world on which to set the context. |
| FScopedLevelCollectionContextSwitch::FScopedLevelCollectionContextSwitch | ( | int32 | InLevelCollectionIndex, |
| UWorld *const | InWorld | ||
| ) |
Constructor that will save the current relevant values of InWorld and set the collection's context values for InWorld.
| InLevelCollectionIndex | The index of the collection to use |
| InWorld | The world on which to set the context. |