Document-LoadingScreenWithLoadPercentage

Fab-9.99$
This is a plugin that converts UMG into a slate widget, displays a loading screen, and displays the loading percentage with a progress bar and text.
This is a video on how to use it.

1.Activate the plugin

Activate the plugin1
The plugin should probably be enabled by default, but if you can't use it, see below. First, activate the plugin.
Activate the plugin2
Check the plugin and restart the editor.

2.Configure UMG

Configure UMG1
Open the Plugin/LoadingScreenWithLoadPercentage Content folder.
Configure UMG2
If you can't see the plugin folder, check Show Plugin Content.
Configure UMG3
If you don't have your own UMG loading screen, duplicate BP_LoadingScreenUserWidget and move it to your content folder.
Configure UMG4
If you want to use your own UMG loading screen, change ParentClass in ClassSettings to LoadingScreenUserWidget.
Configure UMG5
If you want to display loading progress in a bar, it must be a ProgressBar.
Configure UMG6
If you want to display the loading progress as text, it must be Text. Also, the Text of Content must be half-width or full-width %.

3.Show loading screen

3Show-loading-screen1
Here we will use a loading screen with the default character as an example.
3Show-loading-screen2
First, select the loading screen you want to use with Create Widget.
3Show-loading-screen3
Next, drag the Return Value of CreateWidget and use the SetupLoadingScreen function.
CreateWidget's Return Value needs to be connected not only to the Target but also to the Loading Widget.

Minimum Display Time: specifies the minimum number of seconds of loading screen you want to display.

3Show-loading-screen4
Next, drag the Return Value of CreateWidgetReturn Value of CreateWidget and use the BeginAsyncLoadWithPercentageUpdate function. In Object Path: You need the object path of the level you want to open to open the level and get loading progress. It's a little confusing, so I'll write about it below.
3Show-loading-screen5

In Timer Interval: Time interval to update percentages.

Use FInterp to Movement: Smoothly move the progress bar and text that indicate loading progress. If you remove this check, accurate display will occur, but the values ​​will change rapidly.

In Interp Speed: The value used for FInterp to. The higher the value, the faster the loading progress will be.

Min Change Amount with Target Limit: FIntterp to moves much slower when approaching 100%, so set it to the lowest value.

3Show-loading-screen6
About In Object Path. In my case the reference is /Script/Engine.World'/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap' Delete this first and last symbol.

/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap

Be careful not to make a mistake.
・Add /(a slash) in front of Game
・Delete the last '(single quote character)
3Show-loading-screen7
If you play in the viewport or editor window, you can see the percentage movement in the output log. Searching for Logtemp is invalid.

TargetPercentage: Actual progress.Target of FInterpTo.
CurrentPercentage: Percentage of progress bar or text.
ElapsedTime: Elapsed time since loading started.

Adjust it to your liking.
3Show-loading-screen8
The output log can be displayed from the Window at the top left.

4.Supplement

4Supplement1
Loading screen editing must be done before SetupLoadingScreen.
4Supplement2
recommend using custom events and interfaces to make it easier to use. If you want to change it, you can just change that part.
4Supplement3
In this example, we decided to put the map in a common folder and created an ObjectPath using Append.
A: MapFolderPath
B&D: LevelName
C: .(dot)
This makes it easier to use because you only need to enter the LevelName.
4Supplement4
We also recommend creating a Bool variable like IsLoading to limit the display of loading screens. If you set the default value to false, it will automatically become false after the level transition, which is convenient.
4Supplement5
For the loading screen widget, we recommend using Scale Box, Stretch to Scale to Fit, and Stretch Direction to Both. (If you do not do this, the display may change during Open Level)
4Supplement6
Added on 2024/02/25.
It is easier to adjust if SizeBox is a child of ScaleBox.
Set WidthOverride and HeightOverride to the size you expect.

Added on 2024/10/15
*There was information that using ScaleBox and SizeBox at the same time increases the speed. It may be better not to use SizeBox.

5.Note

5-1.Pseudo pause

5-1note1
This plugin will not work if you pause the game with SetGamePaused.
You can pseudo-pause it by using SetGlobalTimeDilation (example: 0.0001).
I think it would be a good idea to set InTimerInteraval to a value that is one-tenth of GlobalTimeDilation (example: 0.00001).
In this example, InInterpSpeed ​​of 10000.0 seems good.
5-1note2
Note that the value of SetGlobalTimeDilation is clamped to the Min Global Time Dilation found in the World Setting. The above example is for Min Global Time Dilation's default value of 0.0001.
5-1note3
Unlike poses, input actions are effective. If you have a problem, please limit it using DisableInput or a Bool variable such as IsLoading. Also, since it doesn't completely stop the game, you may want to limit damage processing with something like CanBeDamaged.

5-2.Be careful how you back up

5-2note
If you set the parent class to LoadingScreenUserWidget, you will not be able to open BP unless this plugin is enabled.
Once you have edited your loading screen, we recommend that you take a backup by duplicating it and changing theparent class to UserWidget.

5-3.Asset Localization

5-3note1.png
This plugin does not work properly with asset localization. This is an example of a countermeasure. Get the current culture and use the switch node to create different widgets for each language. The variable to be set must be “LoadingScreenUserWidget”. *Localization dashboard works fine.
5-3note2.png
postscript:
When using this plugin's functions on UMG, I found that there were problems with asset localization other than loading screens.
If you have a problem, move it to a custom event such as character or game mode and call it on UMG.

It is important to use this plugin's functions outside of UMG.

6.Update_2023/11/04_ver1.11_SectorsLoadingEffect

Add M_SectorsLoadingEffect.
6update.png
You can change the settings in M_SectorsLoadingEffect_Inst in the plugin's material folder.

7.Update_2024/02/25_ver1.2

7-1.Circle Progress Bar

Now get percentages from BP, Now use Circle Progress Bar. I have a simple Circle Progress Bar material in my materials folder.
Added on 2024/02/26 I created a material instance of Circle Progress Bar.
7-1update1.png

This is the loading screen BP.

EventOnPercentageUpdate: Event called every time a percentage is updated.
GetLoadPercentaeg: Pure function to get load percentage.

*Note that you must use the BeginAsyncLoadWithPercentageUpdate function!

7-2.Migrate FadeIn and FadeOut settings to separate functions

7-1update1.png

Enable Fade In / Fade Out: Set to true to enable each effect. In Fade In / Out Timer Interval: Execution interval for each fade step. In Fade In / Out Speed: Speed of opacity change per step. Higher values = faster transitions.

Note that the two Timer Intervals are affected by Global Time Dilation. Use the function before starting the load.

8.Update_2024/03/07_ver1.22_Background Material

Add Background Material. The following sites are recommended for textures used for effects.
EffectTextureMaker

9.Update_2024/03/20_ver1.24_Supports sublevels

9update1.png
Use MakeArray and enter the ObjectPath in InSublevelObjectPath.
9update2.png
You can check the progress of each load. The total load percentage is divided by the number of packages.

10.Update_2024/04/09_ver1.25 EFadeInOutInterpType

10update1.png
Added interp type to FadeIn and FadeOut.

11.Update_2025/07/19_ver1.26 ZOrder

10update1.png
ZOrder set and get is now available.
Widgets with higher ZOrder values are brought to the front.

*The test results show that the ZOrder of the slate widget is -10 compared to UMG. When displaying the load screen, we internally add 10 to the ZOrder to make it feel the same as UMG.