Search Unity

Resolved Stretch Footer Buttons to Full Width

Discussion in 'UGUI & TextMesh Pro' started by siddharth3322, Jan 2, 2023.

  1. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I want to remove space from these buttons those I have placed within footer.
    footer buttons.png

    As you are seeing there is empty space between all buttons, I want to remove that space and buttons to expand at full width.
    Buttons do not have any extra script attached related to layout.

    Horizontal Layout Group I have created to place them in order and here you have its screenshot:
    horizontal layout group.png

    I hope you have all information, please suggest me something on this.
     
  2. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    602
    You also need to enable "Control Child Size". Expanding without controlling the actual width of child buttons will only affect spacing.
     
    siddharth3322 likes this.
  3. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Thank you, this settings worked for me.
    horizontal layout group settings.png

    All buttons stretch out to full width.