Core
NebulaGameMode
Server-side game hooks, the equivalent of subclassing Mirror's NetworkManager.
generated from the sources
Abstract class in namespace
Nebula · Packages/com.1by3.nebula/Runtime/Core/NebulaGameMode.cspublic abstract class NebulaGameMode : MonoBehaviourServer-side game hooks, the equivalent of subclassing Mirror's NetworkManager. Put exactly one subclass in the game scene. Called on whichever worker the gateway picked for the player.
Methods
OnSpawnPlayer
public abstract NetworkIdentity OnSpawnPlayer(NebulaWorker worker, uint clientId, string playerName, Container container);Create and spawn the player's entity inside container. Return the spawned identity.
OnPlayerDespawn
public virtual void OnPlayerDespawn(NebulaWorker worker, NetworkIdentity player);The player's client went away; the worker despawns the entity after this returns.
OnWorkerStarted
public virtual void OnWorkerStarted(NebulaWorker worker);Called once the worker is listening and registered with the control plane.
RandomPointIn
public static Vector3 RandomPointIn(Container container, float margin = 2f, float y = 0f);A convenient uniform spawn point inside a container's floor area.