Navigation
API > API/Runtime > API/Runtime/Engine
Properly scoped/RAII wrapper around a GameInstance/WorldContext/World that makes it easier to write tests involving full UWorld functionality within the scope of one function.
| Name | FTestWorldInstance |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Tests/NetTestHelpers.h |
| Include Path | #include "Tests/NetTestHelpers.h" |
Syntax
struct FTestWorldInstance
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTestWorldInstance
(
const FGameInstancePIEParameters& InstanceParams |
Tests/NetTestHelpers.h | ||
FTestWorldInstance
(
FTestWorldInstance&& Other |
Tests/NetTestHelpers.h | ||
FTestWorldInstance
(
bool bDelayedInit |
Tests/NetTestHelpers.h | ||
FTestWorldInstance
(
const FTestWorldInstance& |
Tests/NetTestHelpers.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FTestWorldInstance() |
Tests/NetTestHelpers.h |
Structs
| Name | Remarks |
|---|---|
| FContext |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| GameInstance | UGameInstance * | Tests/NetTestHelpers.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LevelStreamRequestUUID | int32 | Tests/NetTestHelpers.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UNetDriver * GetNetDriver() |
Tests/NetTestHelpers.h | ||
int32 GetPort() |
Tests/NetTestHelpers.h | ||
FContext GetTestContext() |
Tests/NetTestHelpers.h | ||
UWorld * GetWorld() |
Tests/NetTestHelpers.h | ||
FWorldContext * GetWorldContext() |
Tests/NetTestHelpers.h | ||
void LoadStreamingLevel
(
FName LevelName |
Tests/NetTestHelpers.h | ||
void Tick
(
float DeltaSeconds |
Tests/NetTestHelpers.h | ||
void UnloadStreamingLevel
(
FName LevelName |
Tests/NetTestHelpers.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTestWorldInstance CreateClient
(
int32 ServerPort, |
Tests/NetTestHelpers.h | ||
static FTestWorldInstance CreateProxy() |
Tests/NetTestHelpers.h | ||
static FTestWorldInstance CreateServer
(
const TCHAR* InURL, |
Tests/NetTestHelpers.h | ||
static int32 FindUnusedPIEInstance() |
Tests/NetTestHelpers.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTestWorldInstance & operator=
(
const FTestWorldInstance& |
Tests/NetTestHelpers.h | ||
FTestWorldInstance & operator=
(
FTestWorldInstance&& Other |
Tests/NetTestHelpers.h |