Class NetworkInitializer
- Namespace
- StarterKit
- Assembly
- StarterKit.dll
STARTERKIT - Initializes multiplayer networking. Wires up transport, manager, and bridge to CommandProcessor. Handles lobby flow: mode selection → lobby → game start.
public class NetworkInitializer : MonoBehaviour
- Inheritance
-
objectNetworkInitializer
Properties
IsHost
Whether we are the host.
public bool IsHost { get; }
Property Value
- bool
IsInitialized
Whether network is initialized and ready.
public bool IsInitialized { get; }
Property Value
- bool
IsMultiplayer
Whether we are in a multiplayer session.
public bool IsMultiplayer { get; }
Property Value
- bool
NetworkManager
The NetworkManager instance.
public NetworkManager NetworkManager { get; }
Property Value
- NetworkManager
TimeSync
The NetworkTimeSync for multiplayer time control.
public NetworkTimeSync TimeSync { get; }
Property Value
- NetworkTimeSync
Methods
Initialize(GameState, LobbyUI, CountrySelectionUI)
Initialize networking components. Called by Initializer after ENGINE is ready.
public void Initialize(GameState gameStateRef, LobbyUI lobbyUIRef, CountrySelectionUI countrySelectionUIRef)
Parameters
gameStateRefGameStatelobbyUIRefLobbyUIcountrySelectionUIRefCountrySelectionUI
IsCountryHumanControlled(ushort)
Check if a country is controlled by a human player in multiplayer.
public bool IsCountryHumanControlled(ushort countryId)
Parameters
countryIdushort
Returns
- bool