Splitter

Resize neighboring or specified GameObjects on drag. Should be used with layout group.

Note

You can use minWidth and minHeight properties of the LayoutElement to set minimal size of the GameObjects.
And use the SplitterMaxSize component to set the maximum size of the GameObjects. Total maximum size should be less than the total size of the GameObjects.

Options

  • Interactable bool

    Allow users to interact with the splitter.

  • Type SplitterType

    • Horizontal: change heights of the GameObjects.

    • Vertical: change widths of the GameObjects.

  • Update RectTransform bool

    Change RectTransform size of the left and right GameObjects.

  • Update LayoutElement bool

    Change LayoutElement size of the left and right GameObjects.

  • Drag Button PointerEventData.InputButton

    The button that should be pressed to process the drag event.

  • Integer Size bool

    If enabled size is rounded to the integer number.

  • Mode SplitterMode

    • Auto: use previous and next siblings in hierarchy.

    • Manual: use specified targets to resize.

  • Previous Object RectTransform

    Left (or top) GameObject to resize.

  • Next Object RectTransform

    Right (or bottom) GameObject to resize.

  • Cursors Cursors

    Cursors to use.

Events

  • OnStartResize UnityEvent<Splitter>

  • OnResize UnityEvent<Splitter>

  • OnEndResize UnityEvent<Splitter>