Navigation
API > API/Editor > API/Editor/UnrealEd
A helper RAII class to initialize / destroy an editor world. The world will be added to the root set and initialized as an editor world using the provided initialization values. On destruction, will destroy the world and unroot it. This class will also set GWorld & the EditorWorldContext to this world.
| Name | FScopedEditorWorld |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/EditorWorldUtils.h |
| Include Path | #include "EditorWorldUtils.h" |
Syntax
class FScopedEditorWorld
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| EditorWorldUtils.h | |||
FScopedEditorWorld
(
UWorld* InWorld, |
Constructor - Initialize the provided world as an editor world. | EditorWorldUtils.h | |
FScopedEditorWorld
(
const FStringView InLongPackageName, |
FStringView Constructor - Load the specified package & initialize the world as an editor world. | EditorWorldUtils.h | |
FScopedEditorWorld
(
const TSoftObjectPtr< UWorld >& InSoftWorld, |
SoftObjectPtr Constructor - Initialize the provided world as an editor world. | EditorWorldUtils.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScopedEditorWorld() |
Destructor - Destroy the provided world. | EditorWorldUtils.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PrevGWorld | UWorld * | EditorWorldUtils.h | ||
| World | UWorld * | EditorWorldUtils.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWorld * GetWorld() |
Obtain the world managed by this scope, or null if the initialization failed. | EditorWorldUtils.h |