Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public static void Handle(ref NetworkContext context, ref RpcMetadata metadata,
}

#if MULTIPLAYER_TOOLS && (DEBUG || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE)
networkBehaviour.TrackRpcMetricsReceive(ref metadata, ref context, payload.Length);
// Locally invoked RPCs have no message header, so the header and message sizes are 0 and only the payload size is known.
networkBehaviour.TrackRpcMetricsReceive(ref metadata, ref context, Math.Max(context.SerializedHeaderSize + (int)context.MessageSize, payload.Length));
#endif

try
Expand Down