WorldStreamingComponent struct in Thread

Seamless open-world streaming. Placed on a single "world" entity, it keeps a neighbourhood of cell scenes loaded additively around the active camera and unloads cells as it moves away. Cells are square scenes on a grid; author them with the editor's world-streaming baker (which cuts one big scene into cell files) and preview the grid overlay in the viewport.

Properties

EnabledboolMaster switch.
CellSizefloatMetres per cell (square, XZ plane). Default 128.
LoadRadiusintChebyshev radius of cells kept loaded around the camera.
MaxLoadsPerFrameintPer-frame load budget (avoids hitches).
OriginVec3World position of cell (0,0)'s corner.
PathPatternstd::stringMaps cell coords to a file, e.g. assets/cells/cell_{x}_{z}.thread.
Cells are ordinary scenes loaded additively. Each streamed entity is tagged with a runtime StreamedCellComponent so a whole cell can be unloaded by key. Unload uses hysteresis (a cell is dropped only beyond LoadRadius + 1) to avoid thrashing at a boundary.

WorldStreamingComponent struct w Thread

Płynny streaming otwartego świata. Umieszczony na jednej encji „świata” utrzymuje wczytane (addytywnie) sceny komórek w sąsiedztwie aktywnej kamery i wyładowuje te, od których się oddala. Komórki to kwadratowe sceny na siatce; tworzy je baker world streamingu w edytorze (tnie jedną dużą scenę na pliki komórek), a nakładkę siatki podejrzysz w viewporcie.

Właściwości

EnabledboolGłówny przełącznik.
CellSizefloatMetry na komórkę (kwadrat w płaszczyźnie XZ). Domyślnie 128.
LoadRadiusintPromień Czebyszewa komórek trzymanych wokół kamery.
MaxLoadsPerFrameintBudżet wczytań na klatkę (unika przycięć).
OriginVec3Pozycja w świecie narożnika komórki (0,0).
PathPatternstd::stringMapuje współrzędne komórki na plik, np. assets/cells/cell_{x}_{z}.thread.
Komórki to zwykłe sceny wczytywane addytywnie. Każda strumieniowana encja dostaje w czasie działania znacznik StreamedCellComponent, więc całą komórkę można wyładować po kluczu. Wyładowanie ma histerezę (komórka znika dopiero poza LoadRadius + 1), żeby nie migotać na granicy.