mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkIdentitySerializationTests: fix SerializeClient_NotInitial_NotDirty test setup so it actually would serialize if dirty
This commit is contained in:
parent
394ba40310
commit
19f23cb8f6
@ -232,11 +232,18 @@ public void SerializeClient_NotInitial_NotDirty_WritesNothing()
|
||||
out _, out NetworkIdentity serverIdentity, out SerializeTest1NetworkBehaviour serverComp1, out SerializeTest2NetworkBehaviour serverComp2,
|
||||
out _, out NetworkIdentity clientIdentity, out SerializeTest1NetworkBehaviour clientComp1, out SerializeTest2NetworkBehaviour clientComp2);
|
||||
|
||||
// client only serializes owned ClientToServer components
|
||||
clientIdentity.isOwned = true;
|
||||
serverComp1.syncDirection = SyncDirection.ClientToServer;
|
||||
serverComp2.syncDirection = SyncDirection.ClientToServer;
|
||||
clientComp1.syncDirection = SyncDirection.ClientToServer;
|
||||
clientComp2.syncDirection = SyncDirection.ClientToServer;
|
||||
|
||||
// change nothing
|
||||
// clientComp.value = "42";
|
||||
|
||||
// serialize client object
|
||||
serverIdentity.SerializeClient(ownerWriter);
|
||||
clientIdentity.SerializeClient(ownerWriter);
|
||||
Assert.That(ownerWriter.Position, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user