UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
ModTestWorld.h
Go to the documentation of this file.
1// Copyright (c) 2026 Nelaric Contributors
3#pragma once
4
5#if WITH_DEV_AUTOMATION_TESTS
6
7#include "UObject/StrongObjectPtr.h"
8
9class UGameInstance;
10class UWorld;
11
12namespace Mod::Tests
13{
15class INFRASTRUCTURE_API FTestWorld
16{
17public:
21 explicit FTestWorld(bool bWithGameInstance = false);
22
24 ~FTestWorld();
25
27 FTestWorld(const FTestWorld&) = delete;
28
30 FTestWorld& operator=(const FTestWorld&) = delete;
31
33 UWorld& Get() const;
34
36 UGameInstance* GetGameInstance() const;
37
39 void Tick() const;
40
45 void Close();
46
47private:
48 TStrongObjectPtr<UGameInstance> GameInstance;
49 UWorld* World = nullptr;
50};
51} // namespace Mod::Tests
52
53#endif
@ World
An object belonging to a live world.
Definition ModAPIRegistry.h:25