public IEnumerator DragByPath() { Vector2 to = new Vector2(934, 0); var handle = UITestUtils.FindAnyGameObject("Handle"); yield return(Interact.DragPixels("container/Slider/Handle Slide Area/Handle", to)); var center = UITestUtils.CenterPointOfObject(handle.transform as RectTransform); Assert.AreEqual(center.x, 934, 0.1f); Assert.AreEqual(center.y, 526, 0.1f); }
public IEnumerator DragByCoords() { Vector2 from = new Vector2(45, 526); Vector2 to = new Vector2(934, 0); yield return(Interact.DragPixels(from, to)); var handle = UITestUtils.FindAnyGameObject("Handle"); var center = UITestUtils.CenterPointOfObject(handle.transform as RectTransform); Assert.AreEqual(center.x, 934, 0.1f); Assert.AreEqual(center.y, 526, 0.1f); }