Skip to content

Commit 7a92da2

Browse files
committed
Post-merge fixes
1 parent 13e427b commit 7a92da2

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,14 @@ public void NetworkUpdate(NetworkUpdateStage updateStage)
471471

472472
// This should be invoked just prior to the MessageManager processes its outbound queue.
473473
SceneManager.CheckForAndSendNetworkObjectSceneChanged();
474-
#if !UNIFIED_NETCODE
475-
// Process outbound messages
476-
MessageManager.ProcessSendQueues();
474+
#if UNIFIED_NETCODE
475+
if (!NetworkConfig.Prefabs.HasGhostPrefabs)
476+
{
477+
#endif
478+
// Process outbound messages
479+
MessageManager.ProcessSendQueues();
480+
#if UNIFIED_NETCODE
481+
}
477482
#endif
478483

479484
// Metrics update needs to be driven by NetworkConnectionManager's update to assure metrics are dispatched after the send queue is processed.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void SendRpc(TransportRpc rpc)
144144
{
145145
var rpcQueue = SystemAPI.GetSingleton<RpcCollection>().GetRpcQueue<TransportRpc, TransportRpc>();
146146
var ghostInstance = GetComponentLookup<GhostInstance>();
147-
foreach (var rpcDataStreamBuffer in SystemAPI.Query<DynamicBuffer<OutgoingRpcDataStreamBuffer>>())
147+
foreach (var rpcDataStreamBuffer in SystemAPI.Query<DynamicBuffer<OutgoingOutOfBandRpcDataStreamBuffer>>())
148148
{
149149
rpcQueue.Schedule(rpcDataStreamBuffer, ghostInstance, rpc);
150150
}
@@ -273,7 +273,7 @@ private void OnClientConnectedToServer(Connection connection, NetCodeConnectionE
273273
};
274274
m_ServerClientId = connection.NetworkId.Value;
275275
InvokeOnTransportEvent(NetworkEvent.Connect, (ulong)connection.NetworkId.Value, default, m_RealTimeProvider.RealTimeSinceStartup);
276-
var updateSystem = NetCode.Netcode.GetWorld(false).GetExistingSystemManaged<UnifiedNetcodeUpdateSystem>();
276+
var updateSystem = m_NetworkManager.NetcodeWorld.GetExistingSystemManaged<UnifiedNetcodeUpdateSystem>();
277277
updateSystem.EntityManager.AddBuffer<TransportRpcData>(connection.ConnectionEntity);
278278
}
279279

@@ -286,7 +286,7 @@ private void OnServerNewClientConnection(Connection connection, NetCodeConnectio
286286
Connection = connection
287287
}; ;
288288
InvokeOnTransportEvent(NetworkEvent.Connect, (ulong)connection.NetworkId.Value, default, m_RealTimeProvider.RealTimeSinceStartup);
289-
var updateSystem = NetCode.Netcode.GetWorld(false).GetExistingSystemManaged<UnifiedNetcodeUpdateSystem>();
289+
var updateSystem = m_NetworkManager.NetcodeWorld.GetExistingSystemManaged<UnifiedNetcodeUpdateSystem>();
290290
updateSystem.EntityManager.AddBuffer<TransportRpcData>(connection.ConnectionEntity);
291291
}
292292

0 commit comments

Comments
 (0)