World Streaming Content Layers
Content Layers are logical groups across cells. Use them to switch content sets in the same space by quest phase, time of day, or network role—without duplicating the whole world.
Declare a layer
Add WorldStreamingLayerDesc entries on WorldConfig (m_layers). Assign entities with WorldStreamingMemberComponent m_layerId (default 0).
| Field | Default | Description |
|---|---|---|
m_layerId | 0 | Stable id |
m_name | — | Script-addressable name |
m_flags | Runtime + EnabledByDefault | See flags below |
m_parentLayerId | 0xFFFF (NoParentLayerId) | Parent for hierarchy clamp |
m_streamingPriority | 0 | Ordering bias under budget |
m_debugColor | 0 (auto palette) | 0xRRGGBBAA; non-zero colors fold into contentHash |
ContentLayerFlags
| Flag | Meaning |
|---|---|
Runtime | Enters Manifest; controllable at runtime |
EditorOnly | Editor / bake diagnostics only |
EnabledByDefault | Enabled when the world loads |
LoadedOnlyByDefault | Default baseline is Loaded (not Activated) |
ClientOnly / ServerOnly | Network-role filters (mutually exclusive) |
Default baseline when a layer is enabled: Activated. With LoadedOnlyByDefault: Loaded. When disabled / not enabled: Unloaded.
Runtime tri-state
LayerRuntimeState: Unloaded (drop the layer’s cells) / Loaded (resident, not simulating) / Activated (fully streamed).
auto* wp = WorldStreaming::WorldStreamingInterface::Get();
wp->SetLayerRuntimeState(layerId, WorldStreaming::LayerRuntimeState::Loaded);
wp->GetEffectiveLayerRuntimeState(layerId);
wp->SetLayerEnabled(layerId, true); // true → Activated, false → Unloaded
Script façade: SetContentLayerState / GetEffectiveContentLayerState / SetContentLayerEnabled / FindContentLayerId / SetContentLayerStateByName / progress helpers. Constants: LayerRuntimeState_Unloaded (0) / _Loaded (1) / _Activated (2). See
Scripting.
Layer hierarchy
A child layer’s effective state is the min of itself and its ancestor chain (Unloaded < Loaded < Activated). Query effective state—not only the requested state—when debugging why cells stay Loaded or Unloaded.
Network-role filters
| Flag | Dedicated server | Client | Listen / offline |
|---|---|---|---|
ClientOnly | Does not load | Loads | Both sides keep |
ServerOnly | Loads | Does not load | Both sides keep |
Combine with Multiplayer ServerDriven activation for authoritative gameplay layers.
Interaction with HLOD
- Loaded-only layers: full content stays invisible, but HLOD proxies are exempt from the lower clamp and can remain visible.
- Unloaded layers: proxies are dropped with the content.
Coloring priority in editor overlays: streaming preview > memory heatmap > layer color > density. Details: HLOD, Authoring.
Editor panel
The partition view exposes Content Layer toggles for authoring and diagnostics. Runtime control remains API / script driven for shipped builds.
Next steps
- HLOD: distant proxies that interact with layer state.
- Multiplayer: ClientOnly / ServerOnly under authority modes.
- Scripting: by-name layer control and
OnContentLayerLoaded.