Progress Bars
Loading Progress (Percentage / Progress Bars)
As of update 1.03 the Loading Screen System supports functionality to read and display the loading progress percentage of levels being loaded. Everything is being handled inside the main LSS Actor and its new component, “BPC_LSS_LoadingProgress”.
Plugin Installation
Download the plugin here, then install it as you would any other UE4 code plugin, i.e.:
In you project folder, create a new directory, “Plugins”
Unpack and place the downloaded plugin to the “Plugins” directory, e.g.:
“\Plugins\LoadingScreenSystemPlugin”
Open the project and under
Edit->Plugins
make sure the plugin is enabled (should be by default).
Enable Loading Progress Feature
Open the Function Library “BP_LSS_FunctionLibrary_Userdefined”
Find and open function “Request Package Progress”
In the Graph add the node “LSS Plugin GetAsyncLoadPercentage” (this step is necessary for the plugin to remain an optional requirement for this feature, not the whole system)
Connect the node to all input and output pins of the function.
In your BP_LSS_Actor (either in its details tab if in scene or as SET function if spawned) set “Enable Loading Progress” to true.
Loading Progress in the UI
The loading progress is automatically sent on each update to the Default UI (selected in the main actor’s details) via a Blueprint Interface call. In order to make a widget compatible, perform the following steps:
In the widget’s “Graph” view, under
“Class Settings->Interfaces”
add the Interface“BPI_LSS_UMG_Interface”
Right click in the EventGraph and add the event
“BPI LSS Update Loading Progress”
(returns a value of 0-100 whenever the loading progress changes)Add a progress bar and / or text element to your UMG and use the output of the above event to set the values (Note: the default UMG Progress Widgets has an input range of 0 to 1)
Loading Progress in the 3D scene
You can use the loading progress value to drive actors in scenes or other effects as well. In the example map named “12_LoadingProgress_Map” the loading screen scene uses the value to scale a makeshift 3d progress bar and increases its material glow through a material parameter collection.
There are two major options to retrieve the current progress percentage:
Use the global function “LSS Get Current Loading Progress” (for example in a tick function)
Bind a custom event to the system’s dispatcher that gets called on each update. For this purpose use the
“LSS Bind To Loading Progress Update”
function (the connected event will fire whenever the loading progress value changes)
A Word on Loading Multiple Sublevels
When multiple levels are being loaded simultaneously (e.g. the level consists of several sublevels), the progress will be averaged by the number of levels, though not by their actual file sizes (therefore having one small and one huge level would for example result in progress going in a different speed from 0-50 and then to 100). In order to have a more accurate display, look for the data table “DT_LSS_LoadingProgress_PackageSizes”
- add your level names (maps that will always be loaded as a single level can be omitted). Use the row name for the level name and in “PackageSize”
either enter the actual size of your level in bytes or as a pure approximation (e.g. “100” for a huge level and “1” for a tiny one), the system uses these values only as a comparison between levels.
Last updated
Was this helpful?