Method RegisterServerDriver
RegisterServerDriver(World, ref NetworkDriverStore, NetDebug, int)
Register multiple NetworkDriver instances to the driverStore that uses different Unity.Networking.Transport.INetworkInterface:
Declaration
public static void RegisterServerDriver(World world, ref NetworkDriverStore driverStore, NetDebug netDebug, int playerCount = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| World | world | Used for determining whether we are running in a client or server world. |
| NetworkDriverStore | driverStore | Store for NetworkDriver. |
| NetDebug | netDebug | For handling logging. |
| int | playerCount | Amount of players the server should allocate receive and send queue for. The estimation is that each player will receive 4 packets. |
RegisterServerDriver(World, ref NetworkDriverStore, NetDebug, NetworkSettings)
Register a multiple NetworkDriver instances to hte driverStore:
Declaration
public static void RegisterServerDriver(World world, ref NetworkDriverStore driverStore, NetDebug netDebug, NetworkSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| World | world | Used for determining whether we are running in a client or server world. |
| NetworkDriverStore | driverStore | Store for NetworkDriver. |
| NetDebug | netDebug | For handling logging. |
| NetworkSettings | settings | A list of the parameters that describe the network configuration. |
Remarks
Not available for WebGL builds. Always available in the Editor.
RegisterServerDriver(World, ref NetworkDriverStore, NetDebug, ref RelayServerData, int)
Register multiple NetworkDriver instances to the driverStore that uses different Unity.Networking.Transport.INetworkInterface:
Declaration
public static void RegisterServerDriver(World world, ref NetworkDriverStore driverStore, NetDebug netDebug, ref RelayServerData relayData, int playerCount = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| World | world | Used for determining whether we are running in a client or server world. |
| NetworkDriverStore | driverStore | Store for NetworkDriver. |
| NetDebug | netDebug | For handling logging. |
| RelayServerData | relayData | Server information to make a connection using a relay server. |
| int | playerCount | Amount of players the server should allocate receive and send queue for. The estimation is that each player will receive 4 packets. |
Remarks
Not available for WebGL builds. Always available in the Editor.