diff --git a/Assets/Mirror/Tests/Editor/NetworkIdentity/NetworkIdentitySerializationTests.cs b/Assets/Mirror/Tests/Editor/NetworkIdentity/NetworkIdentitySerializationTests.cs index 25e8c8dc9..9b8eab08e 100644 --- a/Assets/Mirror/Tests/Editor/NetworkIdentity/NetworkIdentitySerializationTests.cs +++ b/Assets/Mirror/Tests/Editor/NetworkIdentity/NetworkIdentitySerializationTests.cs @@ -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)); }