public override void OnValidatedDrag(PointerEventData eventData) { if (uvDragPlane != null && ModeManager.Instance.PrimaryMode == ModeManager.PrimaryModes.Textures && ModeManager.Instance.SecondaryMode == ModeManager.SecondaryModes.Editing) { var screenPosition = new Vector3(eventData.position.x, eventData.position.y, 0f); var pointerRay = Camera.main.ScreenPointToRay(screenPosition); var newUVOffset = uvDragPlane.UVDraggedPosition(pointerRay); // Note: Polygon surfaces have swapped UVs, so swap them here ParentPolygon.SetOffset(DataSource, (short)newUVOffset.y, (short)newUVOffset.x, rebatch: false); for (var i = 0; i < alignmentGroupedPolygons.Count; i++) { alignmentGroupedPolygons[i].SetOffset(DataSource, (short)newUVOffset.y, (short)newUVOffset.x, rebatch: false); } } else { return; } InspectorPanel.Instance.RefreshAllInspectors(); }