NebulaWorldStreaming
Decides, per role, which cells this process keeps loaded and where the floating origin sits: worker: the cells of every container it leases plus NebulaConfig.WorkerLoadRingCells rings around them (seam physics and ghosts need the neighbo...
Nebula · Packages/com.1by3.nebula/Runtime/World/NebulaWorldStreaming.cspublic sealed class NebulaWorldStreaming : MonoBehaviour, IWorldAnchorDecides, per role, which cells this process keeps loaded and where the floating origin sits:
- worker: the cells of every container it leases plus
NebulaConfig.WorkerLoadRingCellsrings around them (seam physics and ghosts need the neighbours' geometry). The origin follows the centroid of the owned cells. - client (players and bots):
NebulaConfig.ClientLoadRadiusCellsaround the local pawn, the origin follows the pawn. Before a pawn exists, the cells around the origin cell. - gateway / orchestrator: nothing. They only need the container maths, which the manifest provides.
The origin shifts once the pawn/centroid is more than NebulaConfig.OriginShiftThresholdCells cells from the origin cell, so a shift is rare and never happens while pacing on a cell boundary.
Properties
Config
public NebulaConfig Config { get; }Worker
public NebulaWorker Worker { get; }Client
public NebulaClient Client { get; }OwnedCellCount
public int OwnedCellCount { get; }RequiredCellCount
public int RequiredCellCount { get; }Methods
Initialize
public void Initialize(NebulaConfig config, NebulaWorker worker, NebulaClient client);Centroid
public static Vector3Int Centroid(ICollection<Vector3Int> cells);Rounded average coordinate of a set of cells.
NebulaWorld
Nebula's side of a partitioned world (WorldDefinition + WorldContainerManifest): instantiates the manifest's container tree for the registry, owns the WorldStreamer, keeps the virtual containers and every entity's cached positions in ste...
WorldAnchor
Anchor component: keeps the cells around this transform loaded.