NetworkSceneManager
A static class in Root.Township, the global namespace.
Static entry point to the running network scene and to which side this process is (server, client or local test).
- Listed in Global namespace: M to O
- Attributes
Extension
Fields
| Member | What it is |
|---|---|
static TaskCompletionSource<bool> SceneLoadWait | Completes when the network scene has finished starting. The server handler awaits it; it is replaced when the scene shuts down. |
Properties
| Member | What it is |
|---|---|
static INetworkScene Current { get; set; } | The running network scene. |
static INetworkSceneInternal CurrentInternal { get; set; } | Internal interface to the running scene, used by networking code. |
static bool IsLocalTest { get; set; } | True in local test mode, where the server and a player run in one process. |
static bool IsRemoteServer { get; } | True on a real server: IsServer and not a local test. |
static bool IsServer { get; set; } | True on the server, including local test. |
Events
| Member | What it is |
|---|---|
static event Action FinishedEmbeddedSync | Raised on a client once the last embedded scene entity has synced. |
Methods
| Member | What it is |
|---|---|
static void OnSceneSyncFinished() | Raises FinishedEmbeddedSync. Called by the scene when embedded sync ends. |
static void ServerSendOnly(Stream stream) | Stream extension that stops a dedicated server from reading, so the value only flows from server to clients. |