Skip to content

Commit 51dd9be

Browse files
committed
Fix code formatting and remove unused code
1 parent 811c22c commit 51dd9be

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

com.unity.netcode.gameobjects/Runtime/Spawning/NetworkPrefabHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ internal NetworkObject HandleNetworkPrefabSpawn(uint networkPrefabAssetHash, ulo
291291
{
292292
networkObjectInstance = prefabInstanceHandler.Instantiate(ownerClientId, position, rotation, instantiationData);
293293
}
294-
catch(Exception ex)
294+
catch (Exception ex)
295295
{
296296
Debug.LogException(ex);
297297
return null;
@@ -309,7 +309,7 @@ internal NetworkObject HandleNetworkPrefabSpawn(uint networkPrefabAssetHash, ulo
309309
{
310310
networkObjectInstance = prefabInstanceHandler.Instantiate(ownerClientId, position, rotation);
311311
}
312-
catch(Exception ex)
312+
catch (Exception ex)
313313
{
314314
Debug.LogException(ex);
315315
return null;

com.unity.netcode.gameobjects/Tests/Runtime/Connection/StartupExceptionTests.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Unity.Netcode.Transports.UTP;
66
using UnityEngine;
77
using UnityEngine.TestTools;
8-
using Object = System.Object;
98

109
namespace Unity.Netcode.RuntimeTests
1110
{
@@ -41,23 +40,6 @@ private SessionConfig SessionConfigExceptionThrower()
4140
throw new Exception(k_ExceptionText);
4241
}
4342

44-
private void OnPeerConnectedException(NetworkManager networkManager, ConnectionEventData connectionEventData)
45-
{
46-
if (connectionEventData.EventType == ConnectionEvent.PeerConnected)
47-
{
48-
ThrowExceptionAction();
49-
}
50-
}
51-
52-
private void OnClientConnectedException(NetworkManager networkManager, ConnectionEventData connectionEventData)
53-
{
54-
if (connectionEventData.EventType == ConnectionEvent.ClientConnected)
55-
{
56-
ThrowExceptionAction();
57-
}
58-
}
59-
60-
6143
[UnityTest]
6244
public IEnumerator VerifyNetworkManagerHandlesExceptionDuringStart()
6345
{
@@ -124,7 +106,7 @@ public IEnumerator VerifyNetworkManagerHandlesExceptionDuringStart()
124106

125107
if (startType == StartType.Client)
126108
{
127-
// Start the client fully to ensure startup still works with no exceptions
109+
// Start the client fully to ensure startup still works with no exceptions
128110
yield return StartClient(toTest);
129111

130112
Assert.That(toTest.IsListening, Is.True, "Client failed to start");

com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetcodeIntegrationTestHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ public static bool Start(bool host, NetworkManager server, NetworkManager[] clie
576576

577577
internal static bool StartServer(bool host, NetworkManager server)
578578
{
579-
return StartInternal(host, server, new NetworkManager[]{});
579+
return StartInternal(host, server, new NetworkManager[] { });
580580
}
581581

582582

0 commit comments

Comments
 (0)