Skip to content

Commit 003ae42

Browse files
update
Adding conditional to determine if we want to use the UnifiedTransport or not.
1 parent b14c13b commit 003ae42

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,10 @@ internal void Initialize(bool server)
12091209
RealTimeProvider = ComponentFactory.Create<IRealTimeProvider>(this);
12101210

12111211
#if UNIFIED_NETCODE && OUT_OF_BAND_RPC
1212-
NetworkConfig.NetworkTransport = gameObject.AddComponent<UnifiedNetcodeTransport>();
1212+
if (NetworkConfig.Prefabs.HasGhostPrefabs)
1213+
{
1214+
NetworkConfig.NetworkTransport = gameObject.AddComponent<UnifiedNetcodeTransport>();
1215+
}
12131216
#endif
12141217

12151218
MetricsManager.Initialize(this);

0 commit comments

Comments
 (0)