Struct IPCAndSocketDriverConstructor
The default NetCode driver constructor, initialise the server world to use multiple Unity.
- On the server: both Unity.
Networking. and Unity.Transport. IPCNetwork Interface Networking. NetworkDriver in the editor and only a single Unity.Transport. UDPNetwork Interface Networking. driver in the build.Transport. UDPNetwork Interface - On the client:
- a single Unity.
Networking. NetworkDriver if the both client and server worlds are present in the same process.Transport. IPCNetwork Interface - a single Unity.
Networking. driver in all other cases.Transport. UDPNetwork Interface
In the Editor and Development build, if the network simulator is enabled, force on the client to use the Unity.Networking. network driver. To let the client use the IPC network interface when in client and server mode, you must create the server world first (in other words; callTransport. UDPNetwork Interface NetworkStreamDriver.Listen
on it before attempting to connect to it).
- a single Unity.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct IPCAndSocketDriverConstructor : INetworkStreamDriverConstructor
Methods
CreateClientDriver(World, ref NetworkDriverStore, NetDebug)
Create and register a new Unity.
For WebGL builds, client use by default the Unity.
Declaration
public void CreateClientDriver(World world, ref NetworkDriverStore driverStore, NetDebug netDebug)
Parameters
Type | Name | Description |
---|---|---|
World | world | The destination world in which the driver will be created |
Network |
driverStore | An instance of a Network |
Net |
netDebug | The netDebug singleton, for logging errors and debug information |
CreateServerDriver(World, ref NetworkDriverStore, NetDebug)
Create and register one or more network drivers that can be used to listen for incoming connection into the destination Network
In the Editor or in a Client/Server player build, if the Requested
Declaration
public void CreateServerDriver(World world, ref NetworkDriverStore driverStore, NetDebug netDebug)
Parameters
Type | Name | Description |
---|---|---|
World | world | The destination world in which the driver will be created |
Network |
driverStore | An instance of a Network |
Net |
netDebug | The netDebug singleton, for logging errors and debug information |