diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index 3084fa48c..88f51ddd4 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -858,6 +858,7 @@ bool OnSerializeSafely(NetworkBehaviour comp, NetworkWriter writer, bool initial // (jumping back later is WAY faster than allocating a temporary // writer for the payload, then writing payload.size, payload) int headerPosition = writer.Position; + // no varint because we don't know the final size yet writer.WriteInt(0); int contentPosition = writer.Position;