diff --git a/Assets/Mirror/Tests/Editor/SyncVarAttributeHookTest.cs b/Assets/Mirror/Tests/Editor/SyncVarAttributeHookTest.cs index c0695b4c6..4c883f9e8 100644 --- a/Assets/Mirror/Tests/Editor/SyncVarAttributeHookTest.cs +++ b/Assets/Mirror/Tests/Editor/SyncVarAttributeHookTest.cs @@ -131,19 +131,17 @@ public void Hook_CalledWhenSyncingChangedValue(bool intialState) out _, out _, out HookBehaviour serverObject, out _, out _, out HookBehaviour clientObject); - const int clientValue = 10; const int serverValue = 24; // change it on server serverObject.value = serverValue; - clientObject.value = clientValue; // hook should change it on client int callCount = 0; clientObject.HookCalled += (oldValue, newValue) => { callCount++; - Assert.That(oldValue, Is.EqualTo(clientValue)); + Assert.That(oldValue, Is.EqualTo(0)); Assert.That(newValue, Is.EqualTo(serverValue)); }; @@ -215,19 +213,17 @@ public void StaticMethod_HookCalledWhenSyncingChangedValue(bool intialState) out _, out _, out StaticHookBehaviour serverObject, out _, out _, out StaticHookBehaviour clientObject); - const int clientValue = 10; const int serverValue = 24; // change it on server serverObject.value = serverValue; - clientObject.value = clientValue; // hook should change it on client int hookcallCount = 0; StaticHookBehaviour.HookCalled += (oldValue, newValue) => { hookcallCount++; - Assert.That(oldValue, Is.EqualTo(clientValue)); + Assert.That(oldValue, Is.EqualTo(0)); Assert.That(newValue, Is.EqualTo(serverValue)); };