SnapGrid

Allow snapping the RectTransform position or size to the nearest line. Does not work on its own, should be used together with Resizable, Draggable, or DropRectTransform

Options

  • Snap Border Inside SnapGridBase.Border

    Allow snapping to the inner side of the border.

  • Snap Border Outside SnapGridBase.Border

    Allow snapping to the outer side of the border.

  • Padding Vector2

    Padding from borders.

  • Step Vector2

    Size of the grid cells.

  • Spacing Vector

    Empty space between cells.

  • Snap To Spacing bool

    Allow spacing to inner sides of the spacing lines.

SnapGridBase.Border

  • Left bool

  • Right bool

  • Top bool

  • Boottom bool

Events

  • OnLinesChanged UnityEvent

    Raised when lines changed.