This commit is contained in:
vis2k 2021-09-07 01:16:37 +08:00
parent e565fce30b
commit 198fed4bdf

View File

@ -858,6 +858,7 @@ bool OnSerializeSafely(NetworkBehaviour comp, NetworkWriter writer, bool initial
// (jumping back later is WAY faster than allocating a temporary // (jumping back later is WAY faster than allocating a temporary
// writer for the payload, then writing payload.size, payload) // writer for the payload, then writing payload.size, payload)
int headerPosition = writer.Position; int headerPosition = writer.Position;
// no varint because we don't know the final size yet
writer.WriteInt(0); writer.WriteInt(0);
int contentPosition = writer.Position; int contentPosition = writer.Position;