diff --git a/Assets/Mirror/Core/NetworkIdentity.cs b/Assets/Mirror/Core/NetworkIdentity.cs index 645c024f7..6148a478f 100644 --- a/Assets/Mirror/Core/NetworkIdentity.cs +++ b/Assets/Mirror/Core/NetworkIdentity.cs @@ -29,6 +29,12 @@ public struct NetworkIdentitySerialization public int tick; public NetworkWriter ownerWriter; public NetworkWriter observersWriter; + + public void ResetWriters() + { + ownerWriter.Position = 0; + observersWriter.Position = 0; + } } /// NetworkIdentity identifies objects across the network. @@ -1131,8 +1137,7 @@ internal NetworkIdentitySerialization GetServerSerializationAtTick(int tick) ) { // reset - lastSerialization.ownerWriter.Position = 0; - lastSerialization.observersWriter.Position = 0; + lastSerialization.ResetWriters(); // serialize SerializeServer(false,