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

**URL:** <https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192>\
**Category:** World Creation\
**Tags:** Level-Streaming, unreal-engine, UE5-0, question\
**Created:** [June 12, 2022, 4:51pm UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192 "2022-06-12T16:51:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krucifear](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krucifear/32/1038048_2.png) [@Krucifear](https://forums.unrealengine.com/u/Krucifear)\
**Post date:** [June 12, 2022, 4:51pm UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192/1 "2022-06-12T16:51:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Krucifear](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krucifear/32/1038048_2.png) [@Krucifear](https://forums.unrealengine.com/u/Krucifear)\
**Post date:** [June 12, 2022, 6:07pm UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192/2 "2022-06-12T18:07:50Z")

</div>

We added this logging to PlayerInput.cpp

```auto
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

---

<div class="post-metadata">

**Author:** ![Krucifear](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krucifear/32/1038048_2.png) [@Krucifear](https://forums.unrealengine.com/u/Krucifear)\
**Post date:** [June 12, 2022, 11:12pm UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192/3 "2022-06-12T23:12:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JendiaStudios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JendiaStudios](https://forums.unrealengine.com/u/JendiaStudios)\
**Post date:** [July 30, 2024, 3:07pm UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192/4 "2024-07-30T15:07:39Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Frakatchoo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frakatchoo/32/1060026_2.png) [@Frakatchoo](https://forums.unrealengine.com/u/Frakatchoo)\
**Post date:** [October 25, 2024, 10:14am UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192/5 "2024-10-25T10:14:57Z")

</div>

Also interested, any new info?

---

<div class="post-metadata">

**Author:** ![JendiaStudios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JendiaStudios](https://forums.unrealengine.com/u/JendiaStudios)\
**Post date:** [November 4, 2024, 3:41am UTC](https://forums.unrealengine.com/t/ue5-can-something-be-done-to-stop-data-layers-from-stopping-input-during-runtime-in-a-build/580192/6 "2024-11-04T03:41:09Z")

</div>

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

> [@How to check if a Data Layer has finished loading all actors into a level](https://forums.unrealengine.com/t/how-to-check-if-a-data-layer-has-finished-loading-all-actors-into-a-level/1670868/7):
>
> This coroutine library needs to be part of standard Unreal. Thank you for making me aware of it.
