Skip to content

Commit 167bc31

Browse files
committed
Remove unrelated changes
1 parent b294879 commit 167bc31

File tree

1 file changed

+58
-56
lines changed

1 file changed

+58
-56
lines changed

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,30 +1728,32 @@ public void CreateDriver(UnityTransport transport, out NetworkDriver driver,
17281728
#endif
17291729

17301730
#if UTP_TRANSPORT_2_1_ABOVE
1731-
if (m_UseWebSockets && m_RelayServerData.IsWebSocket == 0)
1731+
if (m_ProtocolType == ProtocolType.RelayUnityTransport)
17321732
{
1733-
Debug.LogError("Transport is configured to use WebSockets, but Relay server data isn't. Be sure to use \"wss\" as the connection type when creating the server data (instead of \"dtls\" or \"udp\").");
1734-
}
1733+
if (m_UseWebSockets && m_RelayServerData.IsWebSocket == 0)
1734+
{
1735+
Debug.LogError("Transport is configured to use WebSockets, but Relay server data isn't. Be sure to use \"wss\" as the connection type when creating the server data (instead of \"dtls\" or \"udp\").");
1736+
}
17351737

1736-
if (!m_UseWebSockets && m_RelayServerData.IsWebSocket != 0)
1737-
{
1738-
Debug.LogError("Relay server data indicates usage of WebSockets, but \"Use WebSockets\" checkbox isn't checked under \"Unity Transport\" component.");
1738+
if (!m_UseWebSockets && m_RelayServerData.IsWebSocket != 0)
1739+
{
1740+
Debug.LogError("Relay server data indicates usage of WebSockets, but \"Use WebSockets\" checkbox isn't checked under \"Unity Transport\" component.");
1741+
}
17391742
}
1740-
}
17411743
#endif
17421744

17431745
#if UTP_TRANSPORT_2_0_ABOVE
17441746
if (m_UseWebSockets)
17451747
{
1746-
driver = NetworkDriver.Create(private new WebSocketNetworkInterface(), m_NetworkSettings);
1748+
driver = NetworkDriver.Create(new WebSocketNetworkInterface(), m_NetworkSettings);
17471749
}
17481750
else
17491751
{
17501752
#if UNITY_WEBGL && !UNITY_EDITOR
17511753
Debug.LogWarning($"WebSockets were used even though they're not selected in NetworkManager. You should check {nameof(UseWebSockets)}', on the Unity Transport component, to silence this warning.");
17521754
driver = NetworkDriver.Create(new WebSocketNetworkInterface(), m_NetworkSettings);
17531755
#else
1754-
driver = NetworkDriver.Create(private new UDPNetworkInterface(), m_NetworkSettings);
1756+
driver = NetworkDriver.Create(new UDPNetworkInterface(), m_NetworkSettings);
17551757
#endif
17561758
}
17571759
#else
@@ -1768,10 +1770,10 @@ public void CreateDriver(UnityTransport transport, out NetworkDriver driver,
17681770
out unreliableSequencedFragmentedPipeline,
17691771
out reliableSequencedPipeline);
17701772
#else
1771-
SetupPipelinesForUtp2(driver,
1772-
out unreliableFragmentedPipeline,
1773-
out unreliableSequencedFragmentedPipeline,
1774-
out reliableSequencedPipeline);
1773+
SetupPipelinesForUtp2(driver,
1774+
out unreliableFragmentedPipeline,
1775+
out unreliableSequencedFragmentedPipeline,
1776+
out reliableSequencedPipeline);
17751777
#endif
17761778
}
17771779

@@ -1839,74 +1841,74 @@ private void SetupPipelinesForUtp2(NetworkDriver driver,
18391841
out NetworkPipeline unreliableFragmentedPipeline,
18401842
out NetworkPipeline unreliableSequencedFragmentedPipeline,
18411843
out NetworkPipeline reliableSequencedPipeline)
1842-
{
1844+
{
18431845

1844-
unreliableFragmentedPipeline = driver.CreatePipeline(
1845-
typeof(FragmentationPipelineStage)
1846+
unreliableFragmentedPipeline = driver.CreatePipeline(
1847+
typeof(FragmentationPipelineStage)
18461848
#if UNITY_MP_TOOLS_NETSIM_IMPLEMENTATION_ENABLED
1847-
, typeof(SimulatorPipelineStage)
1849+
, typeof(SimulatorPipelineStage)
18481850
#endif
18491851
#if MULTIPLAYER_TOOLS_1_0_0_PRE_7
18501852
, typeof(NetworkMetricsPipelineStage)
18511853
#endif
1852-
);
1854+
);
18531855

1854-
unreliableSequencedFragmentedPipeline = driver.CreatePipeline(
1855-
typeof(FragmentationPipelineStage),
1856-
typeof(UnreliableSequencedPipelineStage)
1856+
unreliableSequencedFragmentedPipeline = driver.CreatePipeline(
1857+
typeof(FragmentationPipelineStage),
1858+
typeof(UnreliableSequencedPipelineStage)
18571859
#if UNITY_MP_TOOLS_NETSIM_IMPLEMENTATION_ENABLED
1858-
, typeof(SimulatorPipelineStage)
1860+
, typeof(SimulatorPipelineStage)
18591861
#endif
18601862
#if MULTIPLAYER_TOOLS_1_0_0_PRE_7
18611863
, typeof(NetworkMetricsPipelineStage)
18621864
#endif
1863-
);
1865+
);
18641866

1865-
reliableSequencedPipeline = driver.CreatePipeline(
1866-
typeof(ReliableSequencedPipelineStage)
1867+
reliableSequencedPipeline = driver.CreatePipeline(
1868+
typeof(ReliableSequencedPipelineStage)
18671869
#if UNITY_MP_TOOLS_NETSIM_IMPLEMENTATION_ENABLED
1868-
, typeof(SimulatorPipelineStage)
1870+
, typeof(SimulatorPipelineStage)
18691871
#endif
18701872
#if MULTIPLAYER_TOOLS_1_0_0_PRE_7
18711873
, typeof(NetworkMetricsPipelineStage)
18721874
#endif
1873-
);
1874-
}
1875+
);
1876+
}
18751877
#endif
1876-
// -------------- Utility Types -------------------------------------------------------------------------------
1878+
// -------------- Utility Types -------------------------------------------------------------------------------
18771879

18781880

1879-
/// <summary>
1880-
/// Cached information about reliability mode with a certain client
1881-
/// </summary>
1882-
private struct SendTarget : IEquatable<SendTarget>
1883-
{
1884-
public readonly ulong ClientId;
1885-
public readonly NetworkPipeline NetworkPipeline;
1881+
/// <summary>
1882+
/// Cached information about reliability mode with a certain client
1883+
/// </summary>
1884+
private struct SendTarget : IEquatable<SendTarget>
1885+
{
1886+
public readonly ulong ClientId;
1887+
public readonly NetworkPipeline NetworkPipeline;
18861888

1887-
public SendTarget(ulong clientId, NetworkPipeline networkPipeline)
1888-
{
1889-
ClientId = clientId;
1890-
NetworkPipeline = networkPipeline;
1891-
}
1889+
public SendTarget(ulong clientId, NetworkPipeline networkPipeline)
1890+
{
1891+
ClientId = clientId;
1892+
NetworkPipeline = networkPipeline;
1893+
}
18921894

1893-
public bool Equals(SendTarget other)
1894-
{
1895-
return ClientId == other.ClientId && NetworkPipeline.Equals(other.NetworkPipeline);
1896-
}
1895+
public bool Equals(SendTarget other)
1896+
{
1897+
return ClientId == other.ClientId && NetworkPipeline.Equals(other.NetworkPipeline);
1898+
}
18971899

1898-
public override bool Equals(object obj)
1899-
{
1900-
return obj is SendTarget other && Equals(other);
1901-
}
1900+
public override bool Equals(object obj)
1901+
{
1902+
return obj is SendTarget other && Equals(other);
1903+
}
19021904

1903-
public override int GetHashCode()
1904-
{
1905-
unchecked
1906-
{
1907-
return (ClientId.GetHashCode() * 397) ^ NetworkPipeline.GetHashCode();
1905+
public override int GetHashCode()
1906+
{
1907+
unchecked
1908+
{
1909+
return (ClientId.GetHashCode() * 397) ^ NetworkPipeline.GetHashCode();
1910+
}
1911+
}
19081912
}
19091913
}
1910-
}
1911-
}
19121914
}

0 commit comments

Comments
 (0)