class

StreamingManager

Module
Game
Header
#include "Streaming/StreamingManager.h"
Namespace
Mowo

Type aliases

AliasDescription
using SectorCallback = std::function<void(StreamingSector&)>Game hooks — fire on the main thread during Tick.

Public functions

ReturnsNameDescription
StreamingManager&Get
StreamingSettingsSettingsForProjectThe project's streaming block (Config/Engine.mdf, keys streaming.load_radius, .keep_alive_radius, .unload_radius, .max_concurrent_loads, .memory_budget_mb), falling back to the defaults above for anything the project does not set.
voidInitializeassets may be null for grid-only tests; loads then complete instantly (state machine still runs).
voidShutdown
boolIsInitialized
StreamingSector*RegisterSectorDeclare a sector and its resident asset set (typically from the cooked world manifest).
StreamingSector*FindSector
size_tLoadManifestSelf-contained cooked manifest: sectors plus the asset metadata (id/path/type) each needs — the loader registers everything into the asset manager's registry so a shipping build needs no .mdfmeta scan.
size_tLoadManifestFromStringSame manifest, read through the VFS instead of the filesystem — a packaged game keeps its manifest inside Content.meaf, where ParseFromFile cannot see it.
voidTickThe per-frame heart.
voidTick
voidSetOnSectorLoaded
voidSetOnSectorUnloaded
voidSetLayerActiveData layers (UE Data Layers analog) Every layer is active by default; deactivating one despawns its fragments in resident sectors (via the changed hook — the entity streamer installs it) and skips them on future loads.
boolIsLayerActive
voidSetOnLayersChanged
uint32_tCountInStateStats (debug overlay)
size_tSectorCount
const StreamingSettings&GetSettings
floatSectorSizeThe default grid's cell size (the manifest's sector_size).
const std::vector<FStreamingGrid>&GetGridsEvery runtime grid, the default one first.
uint8_tAddGrid
int32_tFindGrid
SectorCoordCoordForPosition
Vec3SectorCenter
const std::vector<FStreamingDataLayer>&GetDataLayers
const std::vector<FStreamingRegion>&GetRegions
const FStreamingRegion*FindRegion
voidAddRegion
boolRemoveRegion
voidSetSectorAlwaysLoaded
voidSetSectorPinned
voidRequestUnload
boolSaveManifest
voidForEachSector
const StreamingSector*FindResidentSectorResident sector by coordinate, or nullptr when unknown/not loaded (F12 — the entity streamer resolves queued fragments against this).

Function details

Get

C++
static StreamingManager& Get()

SettingsForProject

C++
static StreamingSettings SettingsForProject(const std::filesystem::path& configDir)

The project's streaming block (Config/Engine.mdf, keys streaming.load_radius, .keep_alive_radius, .unload_radius, .max_concurrent_loads, .memory_budget_mb), falling back to the defaults above for anything the project does not set. Every host built its settings from the struct default and nothing else, so a project had no way to tune its own streaming at all.

Initialize

C++
void Initialize(const StreamingSettings& settings, RuntimeAssetManager* assets)

assets may be null for grid-only tests; loads then complete instantly (state machine still runs).

Shutdown

C++
void Shutdown()

IsInitialized

C++
bool IsInitialized() const

RegisterSector

C++
StreamingSector* RegisterSector(SectorCoord coord, std::vector<UUID> assets)

Declare a sector and its resident asset set (typically from the cooked world manifest). Re-registering replaces the asset list.

FindSector

C++
StreamingSector* FindSector(SectorCoord coord)

LoadManifest

C++
size_t LoadManifest(const std::string& mdfPath)

Self-contained cooked manifest: sectors plus the asset metadata (id/path/type) each needs — the loader registers everything into the asset manager's registry so a shipping build needs no .mdfmeta scan. Returns the number of sectors loaded.

LoadManifestFromString

C++
size_t LoadManifestFromString(const std::string& mdfText, const std::string& sourceName)

Same manifest, read through the VFS instead of the filesystem — a packaged game keeps its manifest inside Content.meaf, where ParseFromFile cannot see it. sourceName is for diagnostics only.

Tick

C++
void Tick(const std::vector<FSource>& sources)

The per-frame heart. Call from the runtime scene update with every streaming source — the camera plus each StreamingSourceComponent. A sector's distance is its distance to the NEAREST source; with one source this is exactly the old camera-only behaviour. No sources at all leaves every sector where it is: a frame with no viewer is not a reason to unload the world.

Tick

C++
void Tick(const Vec3& cameraPos)

SetOnSectorLoaded

C++
void SetOnSectorLoaded(SectorCallback cb)

SetOnSectorUnloaded

C++
void SetOnSectorUnloaded(SectorCallback cb)

SetLayerActive

C++
void SetLayerActive(const std::string& name, bool active)

Data layers (UE Data Layers analog) Every layer is active by default; deactivating one despawns its fragments in resident sectors (via the changed hook — the entity streamer installs it) and skips them on future loads. The empty name is the base layer and cannot be deactivated.

IsLayerActive

C++
bool IsLayerActive(const std::string& name) const

SetOnLayersChanged

C++
void SetOnLayersChanged(std::function<void()> cb)

CountInState

C++
uint32_t CountInState(SectorState s) const

Stats (debug overlay)

SectorCount

C++
size_t SectorCount() const

GetSettings

C++
const StreamingSettings& GetSettings() const

SectorSize

C++
float SectorSize() const

The default grid's cell size (the manifest's sector_size).

GetGrids

C++
const std::vector<FStreamingGrid>& GetGrids() const

Every runtime grid, the default one first. A manifest declares the rest as Grid nodes in index order; a sector names its grid by index.

AddGrid

C++
uint8_t AddGrid(const FStreamingGrid& grid)

FindGrid

C++
int32_t FindGrid(const std::string& name) const

CoordForPosition

C++
SectorCoord CoordForPosition(const Vec3& worldPos, uint8_t grid = 0) const

SectorCenter

C++
Vec3 SectorCenter(SectorCoord coord) const

GetDataLayers

C++
const std::vector<FStreamingDataLayer>& GetDataLayers() const

GetRegions

C++
const std::vector<FStreamingRegion>& GetRegions() const

FindRegion

C++
const FStreamingRegion* FindRegion(const std::string& name) const

AddRegion

C++
void AddRegion(const std::string& name, std::vector<SectorCoord> cells)

RemoveRegion

C++
bool RemoveRegion(const std::string& name)

SetSectorAlwaysLoaded

C++
void SetSectorAlwaysLoaded(SectorCoord coord, bool value)

SetSectorPinned

C++
void SetSectorPinned(SectorCoord coord, bool value)

RequestUnload

C++
void RequestUnload(SectorCoord coord)

SaveManifest

C++
bool SaveManifest(const std::string& path, std::string* outError = nullptr) const

ForEachSector

C++
void ForEachSector(const std::function<void(const StreamingSector&)>& fn) const

FindResidentSector

C++
const StreamingSector* FindResidentSector(const SectorCoord& coord) const

Resident sector by coordinate, or nullptr when unknown/not loaded (F12 — the entity streamer resolves queued fragments against this).

Generated from Streaming/StreamingManager.h via game.json · Nov 5, 2026Version 1.0.0