public IEnumerator SetStateTest() { var state = new NetworkComponentState { Name = nameof(NetworkTransform), Properties = new List <NetworkComponentProperty> { new NetworkComponentProperty { Name = nameof(NetworkTransform.Position), Value = JsonSerializer.Serialize(m_expectedPosition) }, new NetworkComponentProperty { Name = nameof(NetworkTransform.Rotation), Value = JsonSerializer.Serialize(m_expectedRotation) }, } }; yield return(null); m_networkTransform.SetState(state, 0); yield return(null); Assert.AreEqual(m_expectedPosition, m_networkTransform.Position); Assert.AreEqual(m_expectedRotation, m_networkTransform.Rotation); }