Bootstrap
NebulaBootstrap
Entry point for every Nebula process.
generated from the sources
Class in namespace
Nebula · Packages/com.1by3.nebula/Runtime/Bootstrap/NebulaBootstrap.cs[DefaultExecutionOrder(-1000)]
public sealed class NebulaBootstrap : MonoBehaviourEntry point for every Nebula process. Put one in the boot scene. Reads the role from the command line (-nebula-role worker,gateway) or from EditorRole when running in the Editor, loads the game scene, and starts the matching services. A process is a worker or a client, never both.
-nebula-role client|worker|gateway|orchestrator(comma separated)-nebula-worker-id w1 -nebula-worker-index 1 -nebula-port 7101-nebula-gateway 127.0.0.1:7000-nebula-spacetime http://127.0.0.1:3000 -nebula-database nebula-nebula-workers 4 -nebula-dashboard-port 7080 -nebula-settings npcs=64(orchestrator; settings are game-defined key/values seeded on the control plane, editable on the dashboard)-nebula-name Jesse(client display name)-nebula-advertise 10.0.1.2|auto(address this worker/gateway advertises to peers)-nebula-host process|hetzner -nebula-build-dir /opt/nebula/artifacts(orchestrator: where workers run; cloud hosts also read-nebula-cloud-location/-type/-image/-network/-sshkey/-firewall,-nebula-build-urland the provider token from-nebula-cloud-tokenorHCLOUD_TOKEN)
Fields
EditorRole
public NebulaRoles EditorRole = NebulaRoles.Client;Role used when pressing Play in the Editor (builds read -nebula-role instead).
Config
public NebulaConfig Config;Properties
Instance
public static NebulaBootstrap Instance { get; }Roles
public NebulaRoles Roles { get; }ControlPlane
public IControlPlane ControlPlane { get; }Worker
public NebulaWorker Worker { get; }Gateway
public NebulaGateway Gateway { get; }Orchestrator
public NebulaOrchestrator Orchestrator { get; }Client
public NebulaClient Client { get; }WorldStreaming
public NebulaWorldStreaming WorldStreaming { get; }Per-role cell streaming policy; null unless NebulaConfig.WorldManifest is set.
Methods
EnsureExists
public static NebulaBootstrap EnsureExists();The prefab used for the boot scene's Nebula object when none exists (editor convenience).