UE5 Can something be done to stop Data Layers from stopping input during runtime in a Build?

We’ve been implementing Data Layers to stream our world and are having great success in optimization. Our levels are rich with content and have extreme Z depth and traversal.

However when we run our player character through the world, each time a new Data Layer loads, input is abruptly halted. (Still holding down the run/walk key, the player character stops)

Is there something still bound in the engine that is making this happen at runtime?
Is there something Epic engineers can do to fix this?
Is there something we can do to remedy this.

It only happens in a Build.

1 Like

We added this logging to PlayerInput.cpp

void UPlayerInput::FlushPressedKeys()
{
	UE_LOG(LogTemp, Warning, TEXT("UPlayerInput::FlushPressedKeys"));

Anytime a Datalayer changes state in a build this gets executed… but not in the editor… let the hunt begin…

In fact it gets called multiple times, which does not happen in the editor … see log snippet below

[2022.06.12-17.54.08:890][998]LogWorldPartition: Data Layer ‘RestorationStation’ state changed: Unloaded → Activated
[2022.06.12-17.54.08:890][998]LogWorldPartition: Data Layer ‘RestorationStation’ effective state changed: Unloaded → Activated
[2022.06.12-17.54.08:893][998]LogWorldPartition: Streaming performance changed: Good → Critical
[2022.06.12-17.54.08:925][998]LogStreaming: Display: FlushAsyncLoading: 0 QueuedPackages, 10 AsyncPackages
[2022.06.12-17.54.08:960][998]LogTemp: Warning: UPlayerInput::FlushPressedKeys
[2022.06.12-17.54.08:983][999]LogWorldPartition: Streaming performance changed: Critical → Good
[2022.06.12-17.54.11:934][136]LogTemp: Warning: UPlayerInput::FlushPressedKeys
[2022.06.12-17.54.15:328][296]LogTemp: Warning: UPlayerInput::FlushPressedKeys

Another example:

[2022.06.12-17.54.22:807][608]LogWorldPartition: Data Layer ‘TowerStairway’ state changed: Unloaded → Activated
[2022.06.12-17.54.22:807][608]LogWorldPartition: Data Layer ‘TowerStairway’ effective state changed: Unloaded → Activated
[2022.06.12-17.54.22:810][608]LogWorldPartition: Streaming performance changed: Good → Critical
[2022.06.12-17.54.22:829][608]LogStreaming: Display: FlushAsyncLoading: 0 QueuedPackages, 128 AsyncPackages
[2022.06.12-17.54.22:864][608]LogTemp: Warning: UPlayerInput::FlushPressedKeys
[2022.06.12-17.54.22:890][609]LogWorldPartition: Streaming performance changed: Critical → Good

1 Like

Found the problem. UE expects you will be playing a video when streaming something in…

in void FStreamingPauseRenderingModule::BeginStreamingPause( FViewport* GameViewport )
is hard coded to
// We started playing a movie
bMovieWasStarted = true;

Solution is to:
GEngine->RegisterBeginStreamingPauseRenderingDelegate(nullptr);

Then set it back after the datalayer is loaded

1 Like

Hi Krucifear, we’ve been struggling with Data Layers and have not been able to find a way to know when a Data Layer is loaded/activated. It seems that these functions don’t exist. We’re using Unreal 5.3 with Blueprints. Perhaps the functions are there in C++ but are not exposed in BPs?

Three challenges we’re trying to figure out:
(1) How to prevent rendering/freezing during Layer activation.
(2) How to control the rate of load/activation over time (this would solve #1).
(3) How to detect when a layer has finished loading/unloading/activating.

Any help would be appreciated!

Also interested, any new info?

Some progress on this topic has been made in this thread: