Service
The Network Service subsystem manages the full multiplayer service lifecycle: connecting to a backend (Unity Gaming Services, Steam, etc.), authenticating users, creating and joining sessions, and tearing down connections. It acts as the high-level orchestrator between the NetworkManager, transport-specific service adapters, and network sessions.
Architecture
Data Flow
Key Concepts
NetworkService
Orchestrates the full multiplayer lifecycle: connect → sign in → session → disconnect. Owned by NetworkManager.
NetworkServiceType
Enum selecting which backend platform to use (Unity, Steam, Epic).
NetworkUser
Immutable record representing an authenticated user with an ID and display Name.
PlayerJoinedMessage
Network message broadcast by the host when a new player joins the session.
PlayerLeftMessage
Network message broadcast by the host when a player leaves the session.
SynchronizationMessage
Network message sent from host to a newly connected client containing the full player list.
Service Lifecycle
Connect —
NetworkService.Connect()creates anIServiceAdapterfor the chosen platform and sets up the matchingNetworkTransporton the NetcodeNetworkManager.Sign In —
NetworkService.SignIn()authenticates anonymously via the adapter, producing aNetworkUserthat is packed intoConnectionData.Session —
QuickStart()queries for existing sessions and joins the first one found, or creates a new one if none exist.CreateSession()andJoinSession()are also available directly.Player Sync — When a new client connects, the host sends a
SynchronizationMessagewith the full player list, then broadcasts aPlayerJoinedMessageto all other clients.Disconnect —
LeaveSession()exits the session,SignOut()deauthenticates, andDisconnect()tears down the transport layer.Shutdown —
Shutdown()performs all teardown steps in order (session → sign out → disconnect).
Classes
High-level multiplayer service orchestrator
Enum for selecting the network backend platform
Authenticated user identity record
Network message for player join events
Network message for player leave events
Network message for initial player list synchronization
See Also
Network — parent system overview
NetworkManager — singleton entry point that owns
NetworkServiceConnectionData — serializable struct carrying user identity
NetworkPlayer — record linking user identity with network client
Last updated