Nebula
World partition

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...

generated from the sources
public sealed class NebulaWorldStreaming : MonoBehaviour, IWorldAnchor

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 neighbours' geometry). The origin follows the centroid of the owned cells.
  • client (players and bots): NebulaConfig.ClientLoadRadiusCells around 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.

On this page