Skip to content

Commit 538ad1f

Browse files
committed
removed references to unet in code
1 parent b7993ab commit 538ad1f

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

Assets/BossRoom/Scripts/Shared/Game/UI/Editor/NetworkLatencyWarning.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.UI;
44
using Unity.Netcode;
5-
using Unity.Netcode.Transports.UNET;
65
using Unity.Netcode.Transports.UTP;
7-
using Unity.Networking.Transport.Utilities;
86
using UnityEngine.Assertions;
97

108

@@ -27,9 +25,6 @@ void Update()
2725

2826
switch (chosenTransport)
2927
{
30-
case UNetTransport unetTransport:
31-
m_ArtificialLatencyEnabled = false;
32-
break;
3328
case UnityTransport unityTransport:
3429
// adding this preprocessor directive check since UnityTransport's simulator tools only inject latency in #UNITY_EDITOR or in #DEVELOPMENT_BUILD
3530
#if UNITY_EDITOR || DEVELOPMENT_BUILD

Assets/BossRoom/Scripts/Shared/Net/ConnectionManagement/ClientGameNetPortal.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using UnityEngine.SceneManagement;
77
using Unity.Multiplayer.Samples.Utilities;
88
using Unity.Netcode;
9-
using Unity.Netcode.Transports.UNET;
109
using Unity.Netcode.Transports.UTP;
1110

1211
namespace Unity.Multiplayer.Samples.BossRoom.Client
@@ -175,10 +174,6 @@ public void StartClient(string ipaddress, int port)
175174

176175
switch (chosenTransport)
177176
{
178-
case UNetTransport unetTransport:
179-
unetTransport.ConnectAddress = ipaddress;
180-
unetTransport.ConnectPort = port;
181-
break;
182177
case UnityTransport unityTransport:
183178
// TODO: once this is exposed in the adapter we will be able to change it
184179
unityTransport.SetConnectionData(ipaddress, (ushort)port);

Assets/BossRoom/Scripts/Shared/Net/ConnectionManagement/GameNetPortal.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Unity.Multiplayer.Samples.BossRoom.Shared.Infrastructure;
66
using Unity.Multiplayer.Samples.BossRoom.Shared.Net.UnityServices.Lobbies;
77
using Unity.Netcode;
8-
using Unity.Netcode.Transports.UNET;
98
using Unity.Netcode.Transports.UTP;
109
using Unity.Services.Authentication;
1110
using Unity.Services.Core;
@@ -178,10 +177,6 @@ public void StartHost(string ipaddress, int port)
178177
// sample does, since current Transport API doesn't expose these fields.
179178
switch (chosenTransport)
180179
{
181-
case UNetTransport unetTransport:
182-
unetTransport.ConnectAddress = ipaddress;
183-
unetTransport.ServerListenPort = port;
184-
break;
185180
case UnityTransport unityTransport:
186181
unityTransport.SetConnectionData(ipaddress, (ushort)port);
187182
break;

Assets/BossRoom/Scripts/Shared/TransportPicker.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Unity.Netcode;
2-
using Unity.Netcode.Transports.UNET;
32
using Unity.Netcode.Transports.UTP;
43
using UnityEngine;
54
using UnityEngine.Assertions;
@@ -28,7 +27,7 @@ public class TransportPicker : MonoBehaviour
2827

2928
void OnValidate()
3029
{
31-
Assert.IsTrue(m_IpHostTransport == null || (m_IpHostTransport as UNetTransport || m_IpHostTransport as UnityTransport),
32-
"IpHost transport must be either Unet transport or UTP.");
30+
Assert.IsTrue(m_IpHostTransport == null || m_IpHostTransport as UnityTransport,
31+
"IpHost transport must be UTP.");
3332
}
3433
}

0 commit comments

Comments
 (0)