Skip to content

Commit af564b6

Browse files
chore: merge v2.0.0-pre.3 into develop-2.0.0 (#2991)
* update Updating NGO to v2.0.0-pre.3 Updating UTP dependency to v2.3.0 Updating manifest to current dependencies Updating project version to 6000.0.10f1 * chore: 2.0.0-pre.3 additional last minute updates (#2978) * update missed actually updating the version. * update Added `UnityTransport.GetNetworkDriver` and `UnityTransport.GetLocalEndpoint` methods. * update Updating changelog file. * fix: metrics tooltips and serialized type non optimized warning message handling (#2979) * update Adding xml API documentation and tooltips for the `NetworkConfig.NetworkMessageMetrics` and `NetworkConfig.NetworkProfilingMetrics` properties. * update Added a static helper method in `NetworkManager` to handle logging when a serialized type is not yet optimized for distributed authority. * fix This fix includes the up-port of #2980 (RNSM not tracking RPCs in release builds). Fixing the issue where I forgot to add the serialized type for the not optimized warning message update. * fix: deferred despawn gc allocation (#2983) * fix Remove GC alloc when creating list for deferred despawn. * update adding log entry for fix. * update adding PR for the fix * chore: Anticipated not supported warning (#2982) chore notify user that this component is not supported in distributed authority mode * fix: allow clients to set client synchronization mode distributed authority (#2985) * fix Allow clients to set client synchronization mode when in distributed authority mode since clients can be promoted to session owner. * test apply same rules for the integration test version of the scene handler * update adding change log entry * chore making a new unreleased changelog entry
1 parent 9c927df commit af564b6

File tree

19 files changed

+170
-44
lines changed

19 files changed

+170
-44
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

77
Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com).
88

9-
## Unreleased
9+
## [Unreleased]
1010

1111
### Added
1212

1313
### Fixed
1414

15+
### Changed
16+
17+
18+
## [2.0.0-pre.3] - 2024-07-23
19+
20+
### Added
21+
- Added: `UnityTransport.GetNetworkDriver` and `UnityTransport.GetLocalEndpoint` methods to expose the driver and local endpoint being used. (#2978)
22+
23+
### Fixed
24+
25+
- Fixed issue where deferred despawn was causing GC allocations when converting an `IEnumerable` to a list. (#2983)
26+
- Fixed issue where the realtime network stats monitor was not able to display RPC traffic in release builds due to those stats being only available in development builds or the editor. (#2979)
1527
- Fixed issue where `NetworkManager.ScenesLoaded` was not being updated if `PostSynchronizationSceneUnloading` was set and any loaded scenes not used during synchronization were unloaded. (#2971)
1628
- Fixed issue where `Rigidbody2d` under Unity 6000.0.11f1 has breaking changes where `velocity` is now `linearVelocity` and `isKinematic` is replaced by `bodyType`. (#2971)
1729
- Fixed issue where `NetworkSpawnManager.InstantiateAndSpawn` and `NetworkObject.InstantiateAndSpawn` were not honoring the ownerClientId parameter when using a client-server network topology. (#2968)
@@ -22,6 +34,9 @@ Additional documentation and release notes are available at [Multiplayer Documen
2234

2335
### Changed
2436

37+
- Changed logic where clients can now set the `NetworkSceneManager` client synchronization mode when using a distributed authority network topology. (#2985)
38+
39+
2540
## [2.0.0-pre.2] - 2024-06-17
2641

2742
### Added

com.unity.netcode.gameobjects/Runtime/Components/AnticipatedNetworkTransform.cs

+4
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ protected override void OnSynchronize<T>(ref BufferSerializer<T> serializer)
360360

361361
public override void OnNetworkSpawn()
362362
{
363+
if (NetworkManager.DistributedAuthorityMode)
364+
{
365+
Debug.LogWarning($"This component is not currently supported in distributed authority.");
366+
}
363367
base.OnNetworkSpawn();
364368
m_OutstandingAuthorityChange = true;
365369
ApplyAuthoritativeState();

com.unity.netcode.gameobjects/Runtime/Configuration/NetworkConfig.cs

+13-1
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,21 @@ public class NetworkConfig
159159
public bool AutoSpawnPlayerPrefabClientSide = true;
160160

161161
#if MULTIPLAYER_TOOLS
162+
/// <summary>
163+
/// Controls whether network messaging metrics will be gathered. (defaults to true)
164+
/// There is a slight performance cost to having this enabled, and can increase in processing time based on network message traffic.
165+
/// </summary>
166+
/// <remarks>
167+
/// The Realtime Network Stats Monitoring tool requires this to be enabled.
168+
/// </remarks>
169+
[Tooltip("Enable (default) if you want to gather messaging metrics. Realtime Network Stats Monitor requires this to be enabled. Disabling this can improve performance in release builds.")]
162170
public bool NetworkMessageMetrics = true;
163171
#endif
164-
172+
/// <summary>
173+
/// When enabled (default, this enables network profiling information. This does come with a per message processing cost.
174+
/// Network profiling information is automatically disabled in release builds.
175+
/// </summary>
176+
[Tooltip("Enable (default) if you want to profile network messages with development builds and defaults to being disabled in release builds. When disabled, network messaging profiling will be disabled in development builds.")]
165177
public bool NetworkProfilingMetrics = true;
166178

167179
/// <summary>

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public abstract class NetworkBehaviour : MonoBehaviour
2727
// RuntimeAccessModifiersILPP will make this `public`
2828
internal static readonly Dictionary<Type, Dictionary<uint, RpcReceiveHandler>> __rpc_func_table = new Dictionary<Type, Dictionary<uint, RpcReceiveHandler>>();
2929

30-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
30+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
3131
// RuntimeAccessModifiersILPP will make this `public`
3232
internal static readonly Dictionary<Type, Dictionary<uint, string>> __rpc_name_table = new Dictionary<Type, Dictionary<uint, string>>();
3333
#endif
@@ -124,7 +124,7 @@ internal void __endSendServerRpc(ref FastBufferWriter bufferWriter, uint rpcMeth
124124
}
125125

126126
bufferWriter.Dispose();
127-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
127+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
128128
if (__rpc_name_table[GetType()].TryGetValue(rpcMethodId, out var rpcMethodName))
129129
{
130130
NetworkManager.NetworkMetrics.TrackRpcSent(
@@ -252,7 +252,7 @@ internal void __endSendClientRpc(ref FastBufferWriter bufferWriter, uint rpcMeth
252252
}
253253

254254
bufferWriter.Dispose();
255-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
255+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
256256
if (__rpc_name_table[GetType()].TryGetValue(rpcMethodId, out var rpcMethodName))
257257
{
258258
if (clientRpcParams.Send.TargetClientIds != null)
@@ -880,7 +880,7 @@ internal void __registerRpc(uint hash, RpcReceiveHandler handler, string rpcMeth
880880
#pragma warning restore IDE1006 // restore naming rule violation check
881881
{
882882
__rpc_func_table[GetType()][hash] = handler;
883-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
883+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
884884
__rpc_name_table[GetType()][hash] = rpcMethodName;
885885
#endif
886886
}
@@ -906,7 +906,7 @@ internal void InitializeVariables()
906906
if (!__rpc_func_table.ContainsKey(GetType()))
907907
{
908908
__rpc_func_table[GetType()] = new Dictionary<uint, RpcReceiveHandler>();
909-
#if UNITY_EDITOR || DEVELOPMENT_BUILD
909+
#if UNITY_EDITOR || DEVELOPMENT_BUILD || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
910910
__rpc_name_table[GetType()] = new Dictionary<uint, string>();
911911
#endif
912912
__initializeRpcs();

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

+35-1
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,40 @@ public class NetworkManager : MonoBehaviour, INetworkUpdateSystem
2929
// RuntimeAccessModifiersILPP will make this `public`
3030
internal static readonly Dictionary<uint, RpcReceiveHandler> __rpc_func_table = new Dictionary<uint, RpcReceiveHandler>();
3131

32-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
32+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
3333
// RuntimeAccessModifiersILPP will make this `public`
3434
internal static readonly Dictionary<uint, string> __rpc_name_table = new Dictionary<uint, string>();
3535
#endif
3636

3737
#pragma warning restore IDE1006 // restore naming rule violation check
3838

39+
#if DEVELOPMENT_BUILD || UNITY_EDITOR
40+
private static List<Type> s_SerializedType = new List<Type>();
41+
// This is used to control the serialized type not optimized messaging for integration test purposes
42+
internal static bool DisableNotOptimizedSerializedType;
43+
/// <summary>
44+
/// Until all serialized types are optimized for the distributed authority network topology,
45+
/// this will handle the notification to the user that the type being serialized is not yet
46+
/// optimized but will only log the message once to prevent log spamming.
47+
/// </summary>
48+
internal static void LogSerializedTypeNotOptimized<T>()
49+
{
50+
if (DisableNotOptimizedSerializedType)
51+
{
52+
return;
53+
}
54+
var type = typeof(T);
55+
if (!s_SerializedType.Contains(type))
56+
{
57+
s_SerializedType.Add(type);
58+
if (NetworkLog.CurrentLogLevel <= LogLevel.Developer)
59+
{
60+
Debug.LogWarning($"[{type.Name}] Serialized type has not been optimized for use with Distributed Authority!");
61+
}
62+
}
63+
}
64+
#endif
65+
3966
internal static bool IsDistributedAuthority;
4067

4168
/// <summary>
@@ -1062,6 +1089,13 @@ public int MaximumFragmentedMessageSize
10621089

10631090
internal void Initialize(bool server)
10641091
{
1092+
#if DEVELOPMENT_BUILD || UNITY_EDITOR
1093+
if (!DisableNotOptimizedSerializedType)
1094+
{
1095+
s_SerializedType.Clear();
1096+
}
1097+
#endif
1098+
10651099
#if COM_UNITY_MODULES_PHYSICS
10661100
NetworkTransformFixedUpdate.Clear();
10671101
#endif

com.unity.netcode.gameobjects/Runtime/Messaging/Messages/RpcMessages.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static unsafe bool Deserialize(ref FastBufferReader reader, ref NetworkCo
4141

4242
payload = new FastBufferReader(reader.GetUnsafePtrAtCurrentPosition(), Allocator.None, reader.Length - reader.Position);
4343

44-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
44+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
4545
if (NetworkBehaviour.__rpc_name_table[networkBehaviour.GetType()].TryGetValue(metadata.NetworkRpcMethodId, out var rpcMethodName))
4646
{
4747
networkManager.NetworkMetrics.TrackRpcReceived(

com.unity.netcode.gameobjects/Runtime/Messaging/RpcTargets/BaseRpcTarget.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ protected void CheckLockBeforeDispose()
3636

3737
private protected void SendMessageToClient(NetworkBehaviour behaviour, ulong clientId, ref RpcMessage message, NetworkDelivery delivery)
3838
{
39-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
39+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
4040
var size =
4141
#endif
4242
behaviour.NetworkManager.MessageManager.SendMessage(ref message, delivery, clientId);
4343

44-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
44+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
4545
if (NetworkBehaviour.__rpc_name_table[behaviour.GetType()].TryGetValue(message.Metadata.NetworkRpcMethodId, out var rpcMethodName))
4646
{
4747
behaviour.NetworkManager.NetworkMetrics.TrackRpcSent(

com.unity.netcode.gameobjects/Runtime/Messaging/RpcTargets/LocalSendRpcTarget.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ internal override void Send(NetworkBehaviour behaviour, ref RpcMessage message,
4646
message.Handle(ref context);
4747
length = tempBuffer.Length;
4848
}
49-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
49+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
5050
if (NetworkBehaviour.__rpc_name_table[behaviour.GetType()].TryGetValue(message.Metadata.NetworkRpcMethodId, out var rpcMethodName))
5151
{
5252
networkManager.NetworkMetrics.TrackRpcSent(

com.unity.netcode.gameobjects/Runtime/Messaging/RpcTargets/ProxyRpcTargetGroup.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ internal class ProxyRpcTargetGroup : BaseRpcTarget, IDisposable, IGroupRpcTarget
1818
internal override void Send(NetworkBehaviour behaviour, ref RpcMessage message, NetworkDelivery delivery, RpcParams rpcParams)
1919
{
2020
var proxyMessage = new ProxyMessage { Delivery = delivery, TargetClientIds = TargetClientIds.AsArray(), WrappedMessage = message };
21-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
21+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
2222
var size =
2323
#endif
2424
behaviour.NetworkManager.MessageManager.SendMessage(ref proxyMessage, delivery, NetworkManager.ServerClientId);
2525

26-
#if DEVELOPMENT_BUILD || UNITY_EDITOR
26+
#if DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE
2727
if (NetworkBehaviour.__rpc_name_table[behaviour.GetType()].TryGetValue(message.Metadata.NetworkRpcMethodId, out var rpcMethodName))
2828
{
2929
foreach (var clientId in TargetClientIds)

com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/NetworkVariableSerialization.cs

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using UnityEngine;
32

43
namespace Unity.Netcode
54
{
@@ -56,10 +55,12 @@ public static void Write(FastBufferWriter writer, ref T value)
5655
{
5756
if (IsDistributedAuthority)
5857
{
59-
if (!Serializer.IsDistributedAuthorityOptimized)
58+
#if DEVELOPMENT_BUILD || UNITY_EDITOR
59+
if (!NetworkManager.DisableNotOptimizedSerializedType && !Serializer.IsDistributedAuthorityOptimized)
6060
{
61-
Debug.Log("This variable is not optimized for use with Distributed Authority");
61+
NetworkManager.LogSerializedTypeNotOptimized<T>();
6262
}
63+
#endif
6364
Serializer.WriteDistributedAuthority(writer, ref value);
6465
}
6566
else
@@ -121,10 +122,12 @@ public static void WriteDelta(FastBufferWriter writer, ref T value, ref T previo
121122
{
122123
if (IsDistributedAuthority)
123124
{
124-
if (!Serializer.IsDistributedAuthorityOptimized)
125+
#if DEVELOPMENT_BUILD || UNITY_EDITOR
126+
if (!NetworkManager.DisableNotOptimizedSerializedType && !Serializer.IsDistributedAuthorityOptimized)
125127
{
126-
Debug.Log("This variable is not optimized for use with Distributed Authority");
128+
NetworkManager.LogSerializedTypeNotOptimized<T>();
127129
}
130+
#endif
128131
Serializer.WriteDeltaDistributedAuthority(writer, ref value, ref previousValue);
129132
}
130133
else

com.unity.netcode.gameobjects/Runtime/SceneManagement/DefaultSceneManagerHandler.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ public void MoveObjectsFromSceneToDontDestroyOnLoad(ref NetworkManager networkMa
333333
public void SetClientSynchronizationMode(ref NetworkManager networkManager, LoadSceneMode mode)
334334
{
335335
var sceneManager = networkManager.SceneManager;
336-
// Don't let non-authority set this value
337-
if ((!networkManager.DistributedAuthorityMode && !networkManager.IsServer) || (networkManager.DistributedAuthorityMode && !networkManager.LocalClient.IsSessionOwner))
336+
// In client-server, we don't let client's set this value.
337+
// In distributed authority, since session owner can be promoted clients can set this value
338+
if (!networkManager.DistributedAuthorityMode && !networkManager.IsServer)
338339
{
339340
if (NetworkLog.CurrentLogLevel <= LogLevel.Normal)
340341
{
@@ -343,7 +344,7 @@ public void SetClientSynchronizationMode(ref NetworkManager networkManager, Load
343344
return;
344345
}
345346
else // Warn users if they are changing this after there are clients already connected and synchronized
346-
if (networkManager.ConnectedClientsIds.Count > (networkManager.IsHost ? 1 : 0) && sceneManager.ClientSynchronizationMode != mode)
347+
if (!networkManager.DistributedAuthorityMode && networkManager.ConnectedClientsIds.Count > (networkManager.IsHost ? 1 : 0) && sceneManager.ClientSynchronizationMode != mode)
347348
{
348349
if (NetworkLog.CurrentLogLevel <= LogLevel.Normal)
349350
{

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

+15-6
Original file line numberDiff line numberDiff line change
@@ -1820,11 +1820,14 @@ internal void DeferredDespawnUpdate(NetworkTime serverTime)
18201820
return;
18211821
}
18221822
var currentTick = serverTime.Tick;
1823-
var deferredCallbackObjects = DeferredDespawnObjects.Where((c) => c.HasDeferredDespawnCheck);
1824-
var deferredCallbackCount = deferredCallbackObjects.Count();
1825-
for (int i = 0; i < deferredCallbackCount - 1; i++)
1823+
var deferredCallbackCount = DeferredDespawnObjects.Count();
1824+
for (int i = 0; i < deferredCallbackCount; i++)
18261825
{
1827-
var deferredObjectEntry = deferredCallbackObjects.ElementAt(i);
1826+
var deferredObjectEntry = DeferredDespawnObjects[i];
1827+
if (!deferredObjectEntry.HasDeferredDespawnCheck)
1828+
{
1829+
continue;
1830+
}
18281831
var networkObject = SpawnedObjects[deferredObjectEntry.NetworkObjectId];
18291832
// Double check to make sure user did not remove the callback
18301833
if (networkObject.OnDeferredDespawnComplete != null)
@@ -1849,9 +1852,15 @@ internal void DeferredDespawnUpdate(NetworkTime serverTime)
18491852
}
18501853
}
18511854

1852-
var despawnObjects = DeferredDespawnObjects.Where((c) => c.TickToDespawn < currentTick).ToList();
1853-
foreach (var deferredObjectEntry in despawnObjects)
1855+
// Parse backwards so we can remove objects as we parse through them
1856+
for (int i = DeferredDespawnObjects.Count - 1; i >= 0; i--)
18541857
{
1858+
var deferredObjectEntry = DeferredDespawnObjects[i];
1859+
if (deferredObjectEntry.TickToDespawn >= currentTick)
1860+
{
1861+
continue;
1862+
}
1863+
18551864
if (!SpawnedObjects.ContainsKey(deferredObjectEntry.NetworkObjectId))
18561865
{
18571866
DeferredDespawnObjects.Remove(deferredObjectEntry);

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

+25
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,31 @@ private struct PacketLossCache
428428

429429
protected NetworkDriver m_Driver;
430430

431+
/// <summary>
432+
/// Gets a reference to the <see cref="Networking.Transport.NetworkDriver"/>.
433+
/// </summary>
434+
/// <returns>ref <see cref="Networking.Transport.NetworkDriver"/></returns>
435+
public ref NetworkDriver GetNetworkDriver()
436+
{
437+
return ref m_Driver;
438+
}
439+
440+
/// <summary>
441+
/// Gets the local sytem's <see cref="NetworkEndpoint"/> that is assigned for the current network session.
442+
/// </summary>
443+
/// <remarks>
444+
/// If the driver is not created it will return an invalid <see cref="NetworkEndpoint"/>.
445+
/// </remarks>
446+
/// <returns><see cref="NetworkEndpoint"/></returns>
447+
public NetworkEndpoint GetLocalEndpoint()
448+
{
449+
if (m_Driver.IsCreated)
450+
{
451+
return m_Driver.GetLocalEndpoint();
452+
}
453+
return new NetworkEndpoint();
454+
}
455+
431456
private PacketLossCache m_PacketLossCache = new PacketLossCache();
432457

433458
private State m_State = State.Disconnected;

com.unity.netcode.gameobjects/TestHelpers/Runtime/IntegrationTestSceneHandler.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -800,16 +800,17 @@ public void SetClientSynchronizationMode(ref NetworkManager networkManager, Load
800800

801801
var sceneManager = networkManager.SceneManager;
802802

803-
// Don't let client's set this value
804-
if (!networkManager.IsServer)
803+
// In client-server, we don't let client's set this value.
804+
// In dsitributed authority, since session owner can be promoted clients can set this value
805+
if (!networkManager.DistributedAuthorityMode && !networkManager.IsServer)
805806
{
806807
if (NetworkLog.CurrentLogLevel <= LogLevel.Normal)
807808
{
808809
NetworkLog.LogWarning("Clients should not set this value as it is automatically synchronized with the server's setting!");
809810
}
810811
return;
811812
}
812-
else if (networkManager.ConnectedClientsIds.Count > (networkManager.IsHost ? 1 : 0) && sceneManager.ClientSynchronizationMode != mode)
813+
else if (!networkManager.DistributedAuthorityMode && networkManager.ConnectedClientsIds.Count > (networkManager.IsHost ? 1 : 0) && sceneManager.ClientSynchronizationMode != mode)
813814
{
814815
if (NetworkLog.CurrentLogLevel <= LogLevel.Normal)
815816
{

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

+5
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ public void OneTimeSetup()
303303
OnOneTimeSetup();
304304

305305
VerboseDebug($"Exiting {nameof(OneTimeSetup)}");
306+
307+
#if DEVELOPMENT_BUILD || UNITY_EDITOR
308+
// Default to not log the serialized type not optimized warning message when testing.
309+
NetworkManager.DisableNotOptimizedSerializedType = true;
310+
#endif
306311
}
307312

308313
/// <summary>

com.unity.netcode.gameobjects/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "com.unity.netcode.gameobjects",
33
"displayName": "Netcode for GameObjects",
44
"description": "Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.",
5-
"version": "2.0.0-pre.2",
5+
"version": "2.0.0-pre.3",
66
"unity": "6000.0",
77
"dependencies": {
88
"com.unity.nuget.mono-cecil": "1.11.4",
9-
"com.unity.transport": "2.2.1"
9+
"com.unity.transport": "2.3.0"
1010
}
1111
}

0 commit comments

Comments
 (0)