FStreamingSectorCookJob
The sector manifest cook, one sector at a time. Begin reads the manifest that is already there (layers, regions, always-loaded flags and hand-added assets survive a regenerate), collects the streamable roots and buckets them; every Step cooks one sector — the entity trees, the HLOD proxy and its collision twin, which is where the time goes on a big level — and Finish writes the file. Nothing touches the manifest before Finish, so a cook abandoned after any number of steps leaves the old one intact. The editor drives this from its tick under a progress card; the one-shot BuildManifest below is the same three calls back to back.
- Module
- Game
- Header
#include "Streaming/StreamingSectorCook.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
FStreamingSectorCookJob() | FStreamingSectorCookJob | |
~FStreamingSectorCookJob() | ~FStreamingSectorCookJob | |
FStreamingSectorCookJob(const FStreamingSectorCookJob&) = delete | FStreamingSectorCookJob |
Public functions
| Returns | Name | Description |
|---|---|---|
FStreamingSectorCookJob& | operator= | |
bool | Begin | False, with the reason, when there is nothing to cook — the manifest is then removed, since a level with no streamable roots must not stream. |
void | RestrictHlodTo | Rebuild the HLOD of these cells only: every other sector keeps the proxies the existing manifest holds. |
bool | Step | Starts the next sector: its trees are written here and its proxies are built on a worker. |
size_t | SectorsDone | |
size_t | SectorCount | |
size_t | HlodCellCount | |
bool | Finish |
Function details
FStreamingSectorCookJob
FStreamingSectorCookJob()~FStreamingSectorCookJob
~FStreamingSectorCookJob()FStreamingSectorCookJob
FStreamingSectorCookJob(const FStreamingSectorCookJob&) = deleteoperator=
FStreamingSectorCookJob& operator=(const FStreamingSectorCookJob&) = deleteBegin
bool Begin(Scene& scene, const std::string& manifestPath, float sectorSize, std::string* outError = nullptr)False, with the reason, when there is nothing to cook — the manifest is then removed, since a level with no streamable roots must not stream.
RestrictHlodTo
void RestrictHlodTo(const std::vector<SectorCoord>& cells)Rebuild the HLOD of these cells only: every other sector keeps the proxies the existing manifest holds. Ignored when the cell size changed, since the old proxies then cover other ground. Call after Begin.
Step
bool Step(bool wait = true)Starts the next sector: its trees are written here and its proxies are built on a worker. With wait the call returns once that sector is finished; without it, it never blocks, and the editor polls it every frame. False once every sector is done.
SectorsDone
size_t SectorsDone() constSectorCount
size_t SectorCount() constHlodCellCount
size_t HlodCellCount() constFinish
bool Finish(std::string* outError = nullptr)