Class RelayParameterExtensions
Extensions for Relay
Inherited Members
Namespace: Unity.Networking.Transport.Relay
Assembly: Unity.Networking.Transport.dll
Syntax
public static class RelayParameterExtensions
Methods
GetRelayParameters(ref NetworkSettings)
Gets the Relay
Declaration
public static RelayNetworkParameter GetRelayParameters(this ref NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | Settings to get parameters from. |
Returns
Type | Description |
---|---|
Relay |
Structure containing the relay parameters. |
WithRelayParameters(ref NetworkSettings, ref RelayServerData, int)
Sets the Relay
Declaration
public static ref NetworkSettings WithRelayParameters(this ref NetworkSettings settings, ref RelayServerData serverData, int relayConnectionTimeMS = 3000)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | Settings to modify. |
Relay |
serverData | Connection information about the relay server. |
int | relayConnectionTimeMS | Frequency at which the relay server will be pinged to maintain the connection alive. Should be set to less than 10 seconds (default is 3 seconds) since that's the time after which the relay server will sever the connection if there is no activity. |
Returns
Type | Description |
---|---|
Network |
Settings structure with modified values. |