# Data Layers - Set Initial Runtime State in Code

**URL:** <https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705>\
**Category:** Blueprint\
**Tags:** World-Partition, unreal-engine, question, Blueprint\
**Created:** [January 14, 2025, 12:01am UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705 "2025-01-14T00:01:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brazen.bryce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brazen.bryce](https://forums.unrealengine.com/u/brazen.bryce)\
**Post date:** [January 14, 2025, 12:01am UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705/1 "2025-01-14T00:01:04Z")

</div>

Hi all,

Is there a way to set a Data Layer’s initial runtime state in code prior to loading the level?

I effectively want to ensure that the data layers I have configured based on a player’s progress in the game block the “Find Player Start” function from running on the GameMode, so that I can dynamically configure which player start is loaded based on the player’s progress.

We reuse the Unreal Levels between different portions of the game, so we need the “initial runtime state” of the Data Layers to change depending on how far the player is.

My first attempt was to handle this via the “Init” function of the Game Instance class, but this gets called before the world has been created (and before the data layer manager has been created), so I can’t modify the runtime state of the data layers.

---

<div class="post-metadata">

**Author:** ![brazen.bryce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brazen.bryce](https://forums.unrealengine.com/u/brazen.bryce)\
**Post date:** [January 22, 2025, 3:42pm UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705/2 "2025-01-22T15:42:41Z")

</div>

@FrostyJas,

Is this something you can help with? 🙏

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [January 25, 2025, 6:49am UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705/3 "2025-01-25T06:49:30Z")

</div>

Hi there @brazen.bryce

Do you mean something like this? [How to set Data Layer "Initial Runtime State" through Editor Utility Widget?](https://forums.unrealengine.com/t/how-to-set-data-layer-initial-runtime-state-through-editor-utility-widget/1655009)

---

<div class="post-metadata">

**Author:** ![brazen.bryce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brazen.bryce](https://forums.unrealengine.com/u/brazen.bryce)\
**Post date:** [January 28, 2025, 7:49pm UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705/4 "2025-01-28T19:49:58Z")

</div>

Hi @FrostyJas ,

The solution on that page doesn’t describe what I’m looking for exactly. The solution on that page mentions loading data layers via an overlap, however, I need to ensure that specific sets of data layers are loaded on frame 1 so that when the “Find Player Start” is called on the game mode, the requested data layers are fully loaded.

The documentation for all of the data layer nodes is very sparse so I’m having trouble understanding how to do this. The “Set Data Layer Runtime State” node for example in Blueprints has no tooltip info.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [January 28, 2025, 11:52pm UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705/5 "2025-01-28T23:52:00Z")

</div>

You can use an abstract default pawn (just camera, no movement). Let the GM spawn it. You should have a base loading screen anyway. When the level loads enough have it fire the calls off, then spawn the real character wherever you want.

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [January 31, 2025, 10:59am UTC](https://forums.unrealengine.com/t/data-layers-set-initial-runtime-state-in-code/2275705/6 "2025-01-31T10:59:54Z")

</div>

Thank you, Rev!
