mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkIdentitySerialization: Reset() function for convenience
This commit is contained in:
parent
04e875ab6c
commit
394ba40310
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>NetworkIdentity identifies objects across the network.</summary>
|
||||
@ -1131,8 +1137,7 @@ internal NetworkIdentitySerialization GetServerSerializationAtTick(int tick)
|
||||
)
|
||||
{
|
||||
// reset
|
||||
lastSerialization.ownerWriter.Position = 0;
|
||||
lastSerialization.observersWriter.Position = 0;
|
||||
lastSerialization.ResetWriters();
|
||||
|
||||
// serialize
|
||||
SerializeServer(false,
|
||||
|
Loading…
Reference in New Issue
Block a user