Navigation
API > API/Runtime > API/Runtime/Engine
Helper structure encapsulating functionality used to defer marking actors and their components as pending kill till right before garbage collection by registering a callback.
| Name | FLevelStreamingGCHelper |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/LevelStreamingGCHelper.h |
| Include Path | #include "Engine/LevelStreamingGCHelper.h" |
Syntax
struct FLevelStreamingGCHelper
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnGCStreamedOutLevelsEvent | TMulticastDelegate_NoParams< void > | Called when streamed out levels are going to be garbage collected | Engine/LevelStreamingGCHelper.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bEnabledForCommandlet | bool | Static bool allows FLevelStreamingGCHelper to be used in a commandlet | Engine/LevelStreamingGCHelper.h |
| bIsPrepareStreamedOutLevelForGCDelayedToWorldTickEnd | bool | Whether RequestUnload delayed its call to PrepareStreamedOutLevelForGC after world tick. | Engine/LevelStreamingGCHelper.h |
| LevelPackageNames | TSet< FName > | Static set of level packages that have been marked by PrepareStreamedOutLevelsForGC | Engine/LevelStreamingGCHelper.h |
| LevelsPendingUnload | TArray< TWeakObjectPtr< ULevel > > | Static array of levels that should be unloaded | Engine/LevelStreamingGCHelper.h |
| NumberOfPreparedStreamedOutLevelsForGC | int32 | The number of unloaded levels prepared for the next GC (used by GetNumLevelsPendingPurge). | Engine/LevelStreamingGCHelper.h |
| OnGCStreamedOutLevels | FOnGCStreamedOutLevelsEvent | Engine/LevelStreamingGCHelper.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddGarbageCollectorCallback() |
Register with the garbage collector to receive callbacks pre and post garbage collection | Engine/LevelStreamingGCHelper.h | |
static void CancelUnloadRequest
(
ULevel* InLevel |
Cancel any pending unload requests for passed in Level. | Engine/LevelStreamingGCHelper.h | |
static void EnableForCommandlet() |
Allows FLevelStreamingGCHelper to be used in a commandlet. | Engine/LevelStreamingGCHelper.h | |
static int32 GetNumLevelsPendingPurge() |
Engine/LevelStreamingGCHelper.h | ||
static void OnPreGarbageCollect() |
Called before garbage collect. | Engine/LevelStreamingGCHelper.h | |
static void OnWorldTickEnd
(
UWorld* InWorld, |
Called at the end of a world tick. | Engine/LevelStreamingGCHelper.h | |
static void PrepareStreamedOutLevelForGC
(
ULevel* Level |
Prepares a level that is marked for unload for the next GC call by marking its actors and components as garbage. | Engine/LevelStreamingGCHelper.h | |
static void PrepareStreamedOutLevelsForGC() |
Prepares levels that are marked for unload for the next GC call by marking their actors and components as garbage. | Engine/LevelStreamingGCHelper.h | |
static void RequestUnload
(
ULevel* InLevel |
Request to be unloaded. | Engine/LevelStreamingGCHelper.h | |
static void TrashPackage
(
UPackage* InPackage |
Trash a package, making sure it will be reloaded if needed again by level streaming | Engine/LevelStreamingGCHelper.h | |
static void VerifyLevelsGotRemovedByGC() |
Verify that the level packages are no longer around. | Engine/LevelStreamingGCHelper.h |