Skip to content

Commit 65dc4e4

Browse files
committed
Updated N4E namespace usages
1 parent 2b06dbf commit 65dc4e4

6 files changed

Lines changed: 15 additions & 14 deletions

File tree

com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
#if UNIFIED_NETCODE
33
using Unity.NetCode;
4-
using Unity.NetCode.Editor;
4+
using Unity.Netcode.Editor;
55
#endif
66
using UnityEditor;
77
using UnityEngine;

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Netcode for Entities' namespace differs from this one only by the casing of a single letter, so a
88
// blanket import of it competes with Unity.Netcode on every name the two happen to share. Importing
99
// only the types used here keeps that surface to exactly those names.
10-
using NetCodeConfig = Unity.NetCode.NetCodeConfig;
10+
using NetCodeConfig = Unity.Netcode.NetcodeConfig;
1111
using NetcodeWorld = Unity.Netcode.NetcodeWorld;
1212
#endif
1313
using Unity.Netcode.Components;
@@ -1375,13 +1375,13 @@ internal void InitializeNetcodeWorld()
13751375

13761376
if (this == Singleton)
13771377
{
1378-
if (NetCode.Netcode.IsActive)
1378+
if (Netcode.IsActive)
13791379
{
13801380
Log.Info(new Context(LogLevel.Normal, "Netcode is not active but has an instance at this point."));
13811381
}
13821382
/// !! Important !!
13831383
/// Clear out any pre-existing configuration in the event this applicatioin instance has already been connected to a session.
1384-
NetCode.Netcode.Reset();
1384+
Netcode.Reset();
13851385
}
13861386

13871387
/// !! Initialize worlds here !!

com.unity.netcode.gameobjects/Runtime/Transports/Unified/UnifiedNetcodeTransport.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public override NetworkEvent PollEvent(out ulong clientId, out ArraySegment<byte
273273
return NetworkEvent.Nothing;
274274
}
275275

276-
private void OnClientConnectedToServer(Connection connection, NetcodeConnectionEvent connectionEvent)
276+
private void OnClientConnectedToServer(Connection connection, Unity.Netcode.NetcodeConnectionEvent connectionEvent)
277277
{
278278
m_Connections[connectionEvent.Id.Value] = new ConnectionInfo
279279
{
@@ -287,7 +287,7 @@ private void OnClientConnectedToServer(Connection connection, NetcodeConnectionE
287287
updateSystem.EntityManager.AddBuffer<TransportRpcData>(connection.ConnectionEntity);
288288
}
289289

290-
private void OnServerNewClientConnection(Connection connection, NetcodeConnectionEvent connectionEvent)
290+
private void OnServerNewClientConnection(Connection connection, Unity.Netcode.NetcodeConnectionEvent connectionEvent)
291291
{
292292
m_Connections[connectionEvent.Id.Value] = new ConnectionInfo
293293
{
@@ -365,7 +365,7 @@ private DisconnectEvents GetDisconnectEventFromNetworkStreamDisconnectReason(Net
365365
return DisconnectEvents.Disconnected;
366366
}
367367

368-
private void OnClientDisconnectFromServer(Connection connection, NetcodeConnectionEvent connectionEvent)
368+
private void OnClientDisconnectFromServer(Connection connection, Unity.Netcode.NetcodeConnectionEvent connectionEvent)
369369
{
370370
SetDisconnectEvent(
371371
GetDisconnectEventFromNetworkStreamDisconnectReason(connectionEvent.DisconnectReason),
@@ -374,12 +374,12 @@ private void OnClientDisconnectFromServer(Connection connection, NetcodeConnecti
374374
InvokeOnTransportEvent(NetworkEvent.Disconnect, (ulong)connectionEvent.Id.Value, default, m_RealTimeProvider.RealTimeSinceStartup);
375375
}
376376

377-
private void OnServerClientDisconnected(Connection connection, NetcodeConnectionEvent connectionEvent)
377+
private void OnServerClientDisconnected(Connection connection, Unity.Netcode.NetcodeConnectionEvent connectionEvent)
378378
{
379379
InvokeOnTransportEvent(NetworkEvent.Disconnect, (ulong)connectionEvent.Id.Value, default, m_RealTimeProvider.RealTimeSinceStartup);
380380
}
381381

382-
private void OnClientConnectionEvent(Connection connection, NetcodeConnectionEvent connectionEvent)
382+
private void OnClientConnectionEvent(Connection connection, Unity.Netcode.NetcodeConnectionEvent connectionEvent)
383383
{
384384
switch (connectionEvent.State)
385385
{
@@ -392,7 +392,7 @@ private void OnClientConnectionEvent(Connection connection, NetcodeConnectionEve
392392
}
393393
}
394394

395-
private void OnServerConnectionEvent(Connection connection, NetcodeConnectionEvent connectionEvent)
395+
private void OnServerConnectionEvent(Connection connection, Unity.Netcode.NetcodeConnectionEvent connectionEvent)
396396
{
397397
switch (connectionEvent.State)
398398
{

com.unity.netcode.gameobjects/Tests/Editor/Transports/UnityTransportTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public void UnityTransport_HostnameValidation((string, bool) testCase)
231231
}
232232
#endif
233233

234-
private class IPCDriverConstructor : INetworkStreamDriverConstructor
234+
private class IPCDriverConstructor : Unity.Netcode.Transports.UTP.INetworkStreamDriverConstructor
235235
{
236236
public void CreateDriver(
237237
UnityTransport transport,

com.unity.netcode.gameobjects/Tests/Editor/Unity.Netcode.Editor.Tests.asmdef

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"Unity.Collections",
66
"Unity.Netcode.Runtime",
77
"Unity.Netcode.GameObjects.Editor",
8+
"GUID:953adc2a6b8b4e3c8df5b728bcd546e9",
89
"Unity.Multiplayer.MetricTypes",
910
"Unity.Multiplayer.NetStats",
1011
"Unity.Multiplayer.Tools.MetricTypes",

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Text;
88
using NUnit.Framework;
99
#if UNIFIED_NETCODE
10-
using Unity.NetCode;
10+
1111
#endif
1212
using Unity.Netcode.GameObjects.Timing;
1313
using Unity.Netcode.RuntimeTests;
@@ -2655,7 +2655,7 @@ internal void SpawnInstanceWithOwnership(NetworkObject networkObjectToSpawn, Net
26552655
// assigning this.
26562656
if (networkObjectToSpawn.HasGhost)
26572657
{
2658-
NetCode.Netcode.Instance.m_ActiveWorld = m_ServerNetworkManager.NetcodeWorld;
2658+
Netcode.Instance.m_ActiveWorld = m_ServerNetworkManager.NetcodeWorld;
26592659
}
26602660
#endif
26612661
networkObjectToSpawn.NetworkManagerOwner = m_ServerNetworkManager; // Required to assure the server does the spawning
@@ -2726,7 +2726,7 @@ private GameObject SpawnObject(NetworkObject prefabNetworkObject, NetworkManager
27262726
// TODO-UNIFIED: NetCode.Netcode.Instance is a singleton and might cause issues assigning this.
27272727
if (prefabNetworkObject.HasGhost)
27282728
{
2729-
NetCode.Netcode.Instance.m_ActiveWorld = m_ServerNetworkManager.NetcodeWorld;
2729+
Netcode.Instance.m_ActiveWorld = m_ServerNetworkManager.NetcodeWorld;
27302730
}
27312731
#endif
27322732
var newInstance = Object.Instantiate(prefabNetworkObject.gameObject);

0 commit comments

Comments
 (0)