class

FLevelDataLayers

Data layers of a loaded One-File-Per-Actor level at runtime (UE's World Partition Data Layers, runtime state Loaded/Unloaded). The layers and each actor's membership live in the level's files (FExternalActorFiles); this is what a running level does with them: bring a layer's actors in with their own ids, take them out again, and start a Play-in-Editor session in the state the player would start in. Every load and unload is recorded where Save reads it, so an actor out with its layer is never taken for deleted.

Module
Game
Header
#include "Scene/LevelDataLayers.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
std::map<std::string, bool>GetLayersThe level's layers with whether each is loaded now.
boolHasLayer
boolIsLayerLoaded
int32_tLoadLayerThe layer's actors whose other layers are loaded too, and that are not in the scene already, join it under the ids their files carry.
int32_tUnloadLayerEvery actor of the layer leaves the scene.
int32_tSetLayerLoaded
int32_tApplyInitialStatesA Play-in-Editor session starts each layer in its runtime initial state, whatever the editor had loaded.
std::set<std::string>CaptureStateThe play world shares its level's path, and with it the record of which layers are out: the editor's is captured before Play and put back at Stop, so a session's unloads never make the editor's next Save keep files of actors the user deleted.
voidRestoreState

Function details

GetLayers

C++
static std::map<std::string, bool> GetLayers(const Scene& scene)

The level's layers with whether each is loaded now. Empty for a level that is not a One-File-Per-Actor map.

HasLayer

C++
static bool HasLayer(const Scene& scene, const std::string& layer)

IsLayerLoaded

C++
static bool IsLayerLoaded(const Scene& scene, const std::string& layer)

LoadLayer

C++
static int32_t LoadLayer(Scene& scene, const std::string& layer, std::string* error = nullptr)

The layer's actors whose other layers are loaded too, and that are not in the scene already, join it under the ids their files carry. Returns how many joined; -1 when the level has no such layer.

UnloadLayer

C++
static int32_t UnloadLayer(Scene& scene, const std::string& layer)

Every actor of the layer leaves the scene. Returns how many left; -1 when the level has no such layer.

SetLayerLoaded

C++
static int32_t SetLayerLoaded(Scene& scene, const std::string& layer, bool loaded)

ApplyInitialStates

C++
static int32_t ApplyInitialStates(Scene& scene)

A Play-in-Editor session starts each layer in its runtime initial state, whatever the editor had loaded. Returns how many layers were unloaded.

CaptureState

C++
static std::set<std::string> CaptureState(const Scene& scene)

The play world shares its level's path, and with it the record of which layers are out: the editor's is captured before Play and put back at Stop, so a session's unloads never make the editor's next Save keep files of actors the user deleted.

RestoreState

C++
static void RestoreState(const Scene& scene, const std::set<std::string>& unloaded)
Generated from Scene/LevelDataLayers.h via game.json · Nov 5, 2026Version 1.0.0