Skip to content

Commit ed2300f

Browse files
fix
Removing debug log entry that is was added for troubleshooting an issue while making changes in this PR. Not throwing an exception when getting a message type by actual message type (only used in DA codec tests). Instead, it now returns the default reliable fragmented sequenced.
1 parent 6b3ca04 commit ed2300f

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4432,7 +4432,7 @@ internal void TransformStateUpdate(ulong senderId, bool isParentingDirective)
44324432
{
44334433
// TODO: Investigate where this state should be applied or just discarded.
44344434
// For now, discard the state if we assumed ownership.
4435-
Debug.LogError($"[Client-{NetworkManager.LocalClientId}] Ignoring inbound update from Client-{0} and parentUpdated:{isParentingDirective}!");
4435+
// Debug.Log($"[Client-{NetworkManager.LocalClientId}] Ignoring inbound update from Client-{0} and parentUpdated:{isParentingDirective}!");
44364436
return;
44374437
}
44384438
// Store the previous/old state

com.unity.netcode.gameobjects/Runtime/Messaging/MessageDelivery.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,14 @@ private static void OnEnterPlayMode()
4848
UpdateMessageTypes();
4949
}
5050
#endif
51-
52-
internal static NetworkMessageTypes GetMessageTypeEnum(Type type)
51+
internal static NetworkDelivery GetDelivery(Type type)
5352
{
53+
// Return the default if not registered or null
5454
if (type == null || !s_MessageToMessageType.ContainsKey(type))
5555
{
56-
var name = type == null ? "null" : type.Name;
57-
throw new Exception($"{name} is not registered in the message to {nameof(NetworkMessageTypes)} table!");
56+
return NetworkDelivery.ReliableFragmentedSequenced;
5857
}
59-
return s_MessageToMessageType[type];
60-
}
61-
62-
internal static NetworkDelivery GetDelivery(Type type)
63-
{
64-
var messageType = GetMessageTypeEnum(type);
65-
return GetDelivery(messageType);
58+
return GetDelivery(s_MessageToMessageType[type]);
6659
}
6760

6861
internal static NetworkDelivery GetDelivery(NetworkMessageTypes messageType)

0 commit comments

Comments
 (0)