API reference
Every public type in the Nebula runtime, generated from the source.
This section is generated from the XML documentation comments in Packages/com.1by3.nebula by website/tools/ApiGen (run npm run gen:api in website/). It covers the runtime assembly, the Editor tooling and the SpacetimeDB control-plane module. Hand-written explanations of how the pieces fit together live in the guides.
Core
Gameplay API: identities, behaviours, variables, RPCs, prediction, the sync components and project configuration.
| Type | Summary |
|---|---|
| AuthorityMode | Enum. Who is the source of truth for a synced component (NGO's AuthorityModes). |
| AuthorityRpcAttribute | Class. Runs on whichever worker has authority over the entity, no matter which worker calls it. |
| ClientRpcAttribute | Class. Runs on every client that knows the entity (or only its owner when sent with OwnerRpc). |
| CommandLine | Static class. Tiny "-key value" / "-flag" parser over Environment.GetCommandLineArgs. |
| INetworkInput | Interface. Marker for the per-tick input struct a predicted entity consumes. |
| IRpcSink | Interface. Where RPCs and state changes go once a behaviour has produced them. |
| NebulaConfig | Class. Project-wide Nebula settings. |
| NebulaGameMode | Abstract class. Server-side game hooks, the equivalent of subclassing Mirror's NetworkManager. |
| NebulaLog | Static class. Thin logging wrapper so every Nebula line is greppable by prefix in headless logs. |
| NebulaRuntime | Static class. Process-wide role context. |
| NetworkAnimator | Class. Replicates an Animator the way NGO's NetworkAnimator does. |
| NetworkBehaviour | Abstract class. Base class for meshed gameplay code. |
| NetworkIdentity | Class. Marks a GameObject as a meshed entity. |
| NetworkPrefabs | Static class. Prefab id table shared by every process. |
| NetworkRigidbody | Class. Puts a Unity Rigidbody under the mesh's authority model. |
| NetworkSyncBehaviour | Abstract class. Base for components that replicate through the per-tick sync channel and support NGO's server/owner authority choice: NetworkTransform and NetworkAnimator. |
| NetworkTime | Static class. Tick model. |
| NetworkTransform | Class. Replicates a Transform the way NGO's NetworkTransform does: per-axis position/rotation/scale selection, change thresholds, local or world space, server or owner authority, buffered tick interpolation or smooth damping on the receiving si... |
| NetworkVariable<T> | Class. Replicated field, NGO-style: declare it on a NetworkBehaviour and Nebula discovers it. |
| NetworkVariableBase | Abstract class. |
| PredictedBehaviour<TInput> | Abstract class. A server-authoritative, client-predicted behaviour (the player controller, typically). |
| PredictedBehaviourBase | Abstract class. Non-generic surface Nebula's worker and client drive; game code derives from PredictedBehaviour<TInput>. |
| RemoteInterpolator | Class. Tick-indexed transform buffer for copies of an entity this process does not simulate: ghosts on a worker and remote entities on a client. |
| ServerRpcAttribute | Class. Sent by the owning client, runs on whichever worker currently has authority over the entity. |
| SyncStateCodec | Static class. Envelope shared by the per-tick sync stream (EntityState/GhostSyncState messages) and the spawn snapshot: [count]{[behaviourIndex][flags][len:ushort][chunk]}. |
Containers
The designer-authored authority volumes and their registry.
| Type | Summary |
|---|---|
| Container | Class. A designer-authored unit of authority: a box volume with its own local coordinate space. |
| ContainerRegistry | Static class. The container graph of the loaded level: every Container, indexed deterministically so all processes agree on indices, plus adjacency. |
World partition
Cell grid, additive streaming and the floating origin (usable without Nebula), plus the baked container manifest and per-role cell streaming.
| Type | Summary |
|---|---|
| IWorldAnchor | Interface. Something the streamer keeps cells loaded around. |
| NebulaWorld | Static class. 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... |
| NebulaWorldStreaming | Class. 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... |
| WorldAnchor | Class. Anchor component: keeps the cells around this transform loaded. |
| WorldCell | Class. Marks the root of a cell scene with its grid coordinate. |
| WorldContainerManifest | Class. The baked container tree of a partitioned world: one container per cell plus every hand-authored Container found inside the cell scenes, with cell-local poses. |
| WorldDefinition | Class. A world partitioned into a 3D grid of cells, each authored as its own additive scene. |
| WorldGrid | Static class. Grid arithmetic shared by the streamer, the editor tooling and Nebula's container integration. |
| WorldOrigin | Static class. The floating origin: which cell currently sits at Unity's (0,0,0). |
| WorldStreamer | Class. Loads and unloads cell scenes additively and keeps them placed relative to the floating origin. |
Worker
The simulation process: spawning, ghosting, handover, the per-tick loop.
| Type | Summary |
|---|---|
| NebulaWorker | Class. The sim worker: a headless Unity process leased authority over a set of containers. |
Client
The game client: gateway connection, prediction driver, title screen.
| Type | Summary |
|---|---|
| NebulaClient | Class. The game client. |
| NebulaTitleScreen | Class. The human client's front door: a small IMGUI panel to type the gateway address and a display name before connecting, and a way back when the connection drops. |
Gateway
The one address clients connect to; routes inputs and re-emits replication.
| Type | Summary |
|---|---|
| NebulaGateway | Class. The one address clients connect to. |
Orchestrator
Worker lifecycle, container assignment, the dashboard and worker hosts.
| Type | Summary |
|---|---|
| CloudHostSettings | Class. Settings a cloud host needs to create a worker machine. |
| HetznerWorkerHost | Class. One Hetzner Cloud VM per worker, created through the Hetzner Cloud API (https://docs.hetzner.cloud). |
| IWorkerHandle | Interface. One launched worker as seen by its host. |
| IWorkerHost | Interface. Where worker instances live. |
| JsonWriter | Class. Just enough JSON writing for the dashboard state document; avoids a JSON library dependency in the runtime. |
| NebulaOrchestrator | Class. Spins worker processes up and down and authoritatively assigns containers to them through the control plane. |
| OrchestratorEvent | Struct. One line of the orchestrator's recent history, shown on the dashboard. |
| OrchestratorHttpServer | Class. The orchestrator's tiny web server: serves the dashboard page and a JSON state document, and forwards commands (POST) to the main thread. |
| ProcessWorkerHost | Class. Runs every worker as a child process of the orchestrator, from the same executable. |
| WorkerHandleState | Enum. |
| WorkerLaunchSpec | Class. What the orchestrator asks a host to run. |
Control plane
The IControlPlane abstraction and its SpacetimeDB and in-process implementations.
| Type | Summary |
|---|---|
| ControlPlaneExtensions | Static class. |
| GatewayInfo | Class. |
| IControlPlane | Interface. Everything the mesh needs from the control plane: a node registry and container leases with epochs. |
| LeaseInfo | Class. |
| LeaseState | Static class. |
| LocalControlPlane | Class. In-process control plane with the exact semantics of the SpacetimeDB module (see Module~/Lib.cs), for single-process runs and tests. |
| SpacetimeControlPlane | Class. IControlPlane over the SpacetimeDB module in Assets/Nebula/SpacetimeDB/Module~. |
| WorkerInfo | Class. |
| WorkerStats | Struct. What a worker reports about itself on every heartbeat. |
| WorkerStatus | Static class. |
Bootstrap
Process entry point and role selection.
| Type | Summary |
|---|---|
| NebulaBootstrap | Class. Entry point for every Nebula process. |
| NebulaRoles | Enum. |
Serialization
NetworkWriter, NetworkReader and type-driven serialization.
| Type | Summary |
|---|---|
| INetworkSerializable | Interface. Implement on structs/classes you want to put in a NetworkVariable<T> or an RPC argument. |
| NetworkReader | Class. Counterpart of NetworkWriter. |
| NetworkSerialization | Static class. Type-driven (de)serialisation used by NetworkVariables and RPC arguments. |
| NetworkWriter | Class. Growable little-endian byte writer used for every Nebula message. |
Transport
The ITransport seam and the LiteNetLib implementation.
| Type | Summary |
|---|---|
| Delivery | Enum. Delivery classes every Nebula link needs. |
| ITransport | Interface. The seam between Nebula and whatever moves bytes. |
| LiteNetTransport | Class. ITransport over LiteNetLib. |
| TransportEvent | Struct. |
Protocol
Wire messages exchanged between workers, gateway and clients.
| Type | Summary |
|---|---|
| AuthorityTransferMsg | Struct. The authority event. |
| ClientInputMsg | Struct. A short run of recent inputs (redundant against loss). |
| ContainerOwnershipEntry | Struct. |
| ContainerOwnershipMsg | Static class. |
| DespawnPlayerMsg | Struct. |
| EntityDespawnMsg | Struct. |
| EntityFlags | Enum. |
| EntityRpcMsg | Struct. |
| EntitySpawnMsg | Struct. Full description of an entity. |
| EntityStateEntry | Struct. One entity's pose inside a WorldState/GhostState batch. |
| EntitySyncMsg | Struct. One entity's sync chunks for one tick (see SyncStateCodec). |
| EntityVarsMsg | Struct. |
| HelloFlags | Enum. |
| HelloMsg | Struct. |
| MsgId | Enum. Wire message ids. |
| OwnerStateMsg | Struct. Authoritative post-simulation state of a predicted entity, for its owner's reconciliation. |
| PeerRole | Enum. |
| PingMsg | Struct. |
| PongMsg | Struct. |
| SpawnPlayerMsg | Struct. |
| WelcomeMsg | Struct. |
| WorldStateMsg | Static class. Batched transforms for one tick from one worker. |
Debug
The in-game status overlay.
| Type | Summary |
|---|---|
| NebulaDebugOverlay | Class. IMGUI status overlay for every role. |
| NebulaProfiler | Static class. Where a worker's tick goes. |
| ProfileSection | Class. A named stretch of code whose cost is accumulated by NebulaProfiler. |
Editor
Unity Editor tooling: builds, local mesh, control-plane helpers, the World window.
| Type | Summary |
|---|---|
| NebulaBuild | Static class. Builds the executables every Nebula role runs from. |
| NebulaMesh | Static class. Developer loop: start SpacetimeDB, publish the control-plane module, launch a local mesh (orchestrator + gateway + N workers, all from the last build), then press Play in the Editor as a client. |
| WorldAssets | Static class. Finds world definitions and manifests in the project and maps scenes back to cells. |
| WorldAuthoring | Static class. Create, open, close, delete and populate cell scenes. |
| WorldBaker | Static class. Builds the WorldContainerManifest: one container per cell plus every Container authored inside the cell scenes, with cell-local poses, in wire order. |
| WorldEditorPlacement | Static class. Keeps cell scenes usable in the editor even though they are authored cell-local. |
| WorldEditorWindow | Class. The World window (Nebula > World): a map of the cell grid, one vertical layer at a time. |
SpacetimeDB module
Tables and reducers of the control-plane module.
| Type | Summary |
|---|---|
| Module | Static class. |