Class NetworkConfiguration
Configuration data for network handlers.
Inherited Members
Namespace: Unity.Services.Multiplayer
Assembly: Unity.Services.Multiplayer.dll
Syntax
public class NetworkConfiguration
Remarks
Used in Start
Properties
DirectNetworkListenAddress
Endpoint (IP address and port) to listen on.
Declaration
public NetworkEndpoint DirectNetworkListenAddress { get; }
Property Value
Type | Description |
---|---|
Network |
Remarks
May differ from Direct
DirectNetworkPublishAddress
Endpoint (IP address and port) to be used by connecting clients.
Declaration
public NetworkEndpoint DirectNetworkPublishAddress { get; }
Property Value
Type | Description |
---|---|
Network |
Remarks
May differ from Direct
RelayClientData
Relay configuration data for a client.
Declaration
public RelayServerData RelayClientData { get; }
Property Value
Type | Description |
---|---|
Relay |
Remarks
Not available when Network
RelayServerData
Relay configuration data for a host or server.
Declaration
public RelayServerData RelayServerData { get; }
Property Value
Type | Description |
---|---|
Relay |
Remarks
Not available when Network
Role
Networking role for this session.
Declaration
public NetworkRole Role { get; }
Property Value
Type | Description |
---|---|
Network |
Remarks
Some flows, such as peer-to-peer matchmaking or Create
Type
The type of network to use for the session.
Declaration
public NetworkType Type { get; }
Property Value
Type | Description |
---|---|
Network |
Methods
UpdatePublishPort(ushort)
Update the port for clients to connect to that will be shared through the session.
Declaration
public void UpdatePublishPort(ushort port)
Parameters
Type | Name | Description |
---|---|---|
ushort | port | The port for clients to connect to |