Skip to content

Commit b734eb5

Browse files
committed
Security improvement. A fix has been implemented to cancel resource loading and prevent level launch in the event of an unexpected system shutdown.
1 parent da38030 commit b734eb5

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

Plugins/LevelProgressTracker/LevelProgressTracker.uplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "1.2.1",
4+
"VersionName": "1.2.2",
55
"FriendlyName": "Level Progress Tracker",
66
"Description": "The Level Progress Tracker (LPT) subsystem provides control over the level resource loading process, enabling real-time monitoring of the percentage of loading progress, the current number of loaded assets, the total number of assets, and the level name.",
77
"Category": "Experimental",

Plugins/LevelProgressTracker/Source/LevelProgressTracker/Private/LevelProgressTrackerSubsytem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ void ULevelProgressTrackerSubsytem::Deinitialize()
2828
OnLevelLoadProgressLPT.Clear();
2929
OnLevelLoadedLPT.Clear();
3030

31+
// Clearing widgets
3132
RemoveSlateWidgetLPT();
33+
34+
// Clearing resources
3235
UnloadAllLevelInstanceLPT();
3336

3437
Super::Deinitialize();

Plugins/LevelProgressTracker/Source/LevelProgressTracker/Private/LevelProgressTrackerSubsytem_Unloading.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ void ULevelProgressTrackerSubsytem::UnloadAllLevelInstanceLPT()
5151
{
5252
if (LevelState->Handle.IsValid())
5353
{
54+
LevelState->Handle->CancelHandle();
5455
LevelState->Handle->ReleaseHandle();
5556
LevelState->Handle.Reset();
5657
}
5758

5859
if (LevelState->LevelInstanceState.LevelReference)
5960
{
61+
ULevelStreamingDynamic* StreamingLevel = LevelState->LevelInstanceState.LevelReference;
62+
StreamingLevel->SetShouldBeVisible(false);
63+
StreamingLevel->SetShouldBeLoaded(false);
6064
// Unloading streaming level
61-
LevelState->LevelInstanceState.LevelReference->SetIsRequestingUnloadAndRemoval(true);
65+
StreamingLevel->SetIsRequestingUnloadAndRemoval(true);
6266
}
6367
}
6468
}

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ LPT is a plugin for Unreal Engine 5 that allows you to quickly and easily create
1111
## Latest Updates
1212
`Experimental`
1313

14-
`Version 1.2.1`
15-
- Global update.
14+
`Version 1.2.2`
1615
- Build version for Unreal Engine 5.6.0
17-
- Code refactoring and decomposition.
18-
- Improved code security and fixed critical errors in extreme situations (e.g., when loading and managing many embedded levels, as well as during critical subsystem shutdown).
19-
- Improved safety when working in PIE mode.
20-
- Added the ability to enable and disable resource preloading for both level-loading methods.
21-
- New functions added: `CreateSlateWidgetLPT` and `RemoveSlateWidgetLPT`. These are special Blueprint-supported functions that allow creating a loading screen based on <b>Slate</b> and <b>UMG</b>. The target UMG is added as a child directly into Slate, which enables the widget to remain visible even when the level is opened using OpenLevel.
22-
- `NEW` Added the `CheckingPIE` function, which helps determine whether the game is running in the editor (PIE) or in standalone mode.
16+
- Security improvement. A fix has been implemented to cancel resource loading and prevent level launch in the event of an unexpected system shutdown.
2317

2418
## What it's for
2519
- Tracking the progress of level asset loading.

0 commit comments

Comments
 (0)