Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UEngine
Description
Tries to find the currently active primary Game or Play in Editor world, returning null if it is ambiguous. This should only be called if you do not have a reliable world context object to use.
| Name | GetCurrentPlayWorld |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Engine.h |
| Include Path | #include "Engine/Engine.h" |
| Source | /Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp |
UWorld * GetCurrentPlayWorld
(
UWorld * PossiblePlayWorld
) const
either nullptr or a World that is guaranteed to be of type Game or PIE
Parameters
| Name | Remarks |
|---|---|
| PossiblePlayWorld | If set, this will be checked first and returned if valid. If this is not the active play world, null will be returned due to ambiguity |