NebulaConfig
Project-wide Nebula settings.
Nebula · Packages/com.1by3.nebula/Runtime/Core/NebulaConfig.cs[CreateAssetMenu(menuName = "Nebula/Config", fileName = "NebulaConfig")]
public sealed class NebulaConfig : ScriptableObjectProject-wide Nebula settings. Lives at Resources/NebulaConfig so every role (worker, gateway, orchestrator, client) loads the same asset. Command-line switches override individual fields at runtime.
Fields
GameScene
public string GameScene = "Arena";Scene containing the Container volumes and gameplay. Loaded by every role.
WorldManifest
public WorldContainerManifest WorldManifest;Baked container manifest of a partitioned world (Nebula > World). Unset = the game scene is the whole world.
ClientLoadRadiusCells
public int ClientLoadRadiusCells = 1;Clients keep this many cells around the local pawn loaded (1 = the 3x3x3 block).
WorkerLoadRingCells
public int WorkerLoadRingCells = 1;Workers keep this many rings of cells around every cell they lease loaded (seam physics and ghosts need the neighbours' geometry).
OriginShiftThresholdCells
public int OriginShiftThresholdCells = 4;The floating origin moves once the pawn (client) or the centroid of the leased cells (worker) is more than this many cells from the origin cell.
GatewayAddress
public string GatewayAddress = "127.0.0.1";GatewayPort
public ushort GatewayPort = 7000;WorkerBasePort
public ushort WorkerBasePort = 7100;Workers listen on WorkerBasePort + workerIndex.
WorkerAdvertiseAddress
public string WorkerAdvertiseAddress = "127.0.0.1";Address workers advertise to peers and the gateway.
SpacetimeUri
public string SpacetimeUri = "http://127.0.0.1:3000";SpacetimeDatabase
public string SpacetimeDatabase = "nebula";UseLocalControlPlane
public bool UseLocalControlPlane = false;Use an in-process control plane instead of SpacetimeDB. Only meaningful when orchestrator, gateway and worker share a process.
WorkerCount
public int WorkerCount = 4;How many worker processes the orchestrator keeps running.
WorkerExecutable
public string WorkerExecutable = "";Executable used to spawn workers/gateway. Empty = this process's own executable.
WorkerHost
public string WorkerHost = "process";Where workers run: 'process' (child processes of the orchestrator) or 'hetzner' (one cloud VM per worker). -nebula-host overrides.
BuildArtifactDir
public string BuildArtifactDir = "";Directory the orchestrator serves at /build/ (the Linux server tarball worker VMs download). Empty = next to the executable.
OrchestratorSpawnsGateway
public bool OrchestratorSpawnsGateway = true;WorkerHeartbeatSeconds
public float WorkerHeartbeatSeconds = 1f;WorkerTimeoutSeconds
public float WorkerTimeoutSeconds = 5f;DeadWorkerReplaceDelaySeconds
public float DeadWorkerReplaceDelaySeconds = 8f;Seconds to wait after a worker is declared dead before a replacement is launched.
WorkerDrainTimeoutSeconds
public float WorkerDrainTimeoutSeconds = 10f;Seconds a retiring worker gets to hand its entities over before it is killed regardless.
DashboardPort
public ushort DashboardPort = 7080;Port of the orchestrator's web dashboard (http://localhost:<port>/). 0 disables it.
GhostBandMargin
public float GhostBandMargin = 4f;Entities within this many metres of a neighbouring container are ghosted to its worker ahead of time.
HandoverHysteresis
public float HandoverHysteresis = 0.35f;An entity must be this far inside a new container before authority flips (anti-thrash).
GhostLingerSeconds
public float GhostLingerSeconds = 2f;Ghosts stay resident this long after leaving the band.
InterestNearRadius
public float InterestNearRadius = 30f;Entities within this many metres of a client's pawn get every tick of the world-state stream.
InterestFarRadius
public float InterestFarRadius = 80f;Entities between the near and far radius get every InterestMidDivisor-th tick.
InterestMidDivisor
public int InterestMidDivisor = 4;Send every Nth tick for entities between the near and far radius (1 = every tick).
InterestFarDivisor
public int InterestFarDivisor = 12;Send every Nth tick for entities beyond the far radius (1 = every tick). Clients without a pawn yet get this rate for everything.
InterpolationDelayTicks
public int InterpolationDelayTicks = 3;Render delay for remote entities, in ticks.
InputLeadMarginTicks
public int InputLeadMarginTicks = 2;Extra ticks of input lead on top of half the measured RTT, before the adaptive adjustment.
InputLeadTargetTicks
public int InputLeadTargetTicks = 3;Lead (in ticks) the client tries to keep its inputs arriving at the worker with. Below this the client sends further ahead at once; well above it, it slowly relaxes.
InputLeadMaxAdjustTicks
public int InputLeadMaxAdjustTicks = 30;Upper bound on the adaptive input lead adjustment, in ticks.
NetworkPrefabs
public List<GameObject> NetworkPrefabs = new List<GameObject>();Every prefab that can be spawned over the network. The index is the prefab id on the wire.
Methods
Load
public static NebulaConfig Load();