public static void MoveCornersToAnchors_Width() { EditorUtils.GetSelectedComponents <RectTransform>().ForEach(it => { Undo.RecordObject(it, "MoveCornersToAnchors_Width"); MoveCornersToAnchorsExtensions.MoveCornersToAnchors_Width(it); }); }
public static void MoveCornersToAnchors_WidthAndCenterHorizontal() { EditorUtils.GetSelectedComponents <RectTransform>().ForEach(it => { Undo.RecordObject(it, "MoveCornersToAnchors_WidthAndCenterHorizontal"); MoveCornersToAnchorsExtensions.MoveCornersToAnchors_Width(it); it.anchoredPosition = new Vector2(0, it.anchoredPosition.y); }); }