UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LevelStreamingGCHelper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7
8class ULevel;
9class UWorld;
10
16{
20
25
31 static ENGINE_API void RequestUnload( ULevel* InLevel );
32
37
42
46 static ENGINE_API void TrashPackage(UPackage* InPackage);
47
51 static ENGINE_API void EnableForCommandlet();
52
53private:
55 static void PrepareStreamedOutLevelsForGC();
56
58 static void VerifyLevelsGotRemovedByGC();
59
61 static void OnPreGarbageCollect();
62
64 static void OnWorldTickEnd(UWorld* InWorld, ELevelTick InTickType, float InDeltaSeconds);
65
67 static void PrepareStreamedOutLevelForGC(ULevel* Level);
68
70 static TArray<TWeakObjectPtr<ULevel> > LevelsPendingUnload;
71
73 static TSet<FName> LevelPackageNames;
74
76 static bool bEnabledForCommandlet;
77
79 static bool bIsPrepareStreamedOutLevelForGCDelayedToWorldTickEnd;
80
82 static int32 NumberOfPreparedStreamedOutLevelsForGC;
83};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ELevelTick
Definition EngineBaseTypes.h:70
Definition Array.h:670
Definition Level.h:423
Definition Package.h:216
Definition World.h:918
Definition LevelStreamingGCHelper.h:16
static ENGINE_API void EnableForCommandlet()
Definition LevelStreamingGCHelper.cpp:38
static ENGINE_API int32 GetNumLevelsPendingPurge()
Definition LevelStreamingGCHelper.cpp:256
static ENGINE_API FOnGCStreamedOutLevelsEvent OnGCStreamedOutLevels
Definition LevelStreamingGCHelper.h:19
static ENGINE_API void TrashPackage(UPackage *InPackage)
Definition LevelStreamingGCHelper.cpp:261
static ENGINE_API void CancelUnloadRequest(ULevel *InLevel)
Definition LevelStreamingGCHelper.cpp:86
static ENGINE_API void RequestUnload(ULevel *InLevel)
Definition LevelStreamingGCHelper.cpp:44
static ENGINE_API void AddGarbageCollectorCallback()
Definition LevelStreamingGCHelper.cpp:25
DECLARE_MULTICAST_DELEGATE(FOnGCStreamedOutLevelsEvent)