Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to set Grid layout so that it expand downward when we add new elements.

Discussion in 'UGUI & TextMesh Pro' started by taqiarzoo424, Apr 29, 2020.

  1. taqiarzoo424

    taqiarzoo424

    Joined:
    Mar 8, 2020
    Posts:
    23
    I'm working on grid layout with content size fitter
    I'm adding the buttons on grid layout in Runtime.
    When buttons are added on run time the container start growing from both sides up and down.
    And I show a middle part of container

    What I want is

    The container should expand only down side

    Before play there is no buttons
    IMG_20200430_005801.jpg

    I'm getting like this
    IMG_20200430_005835.jpg

    I want like this
    IMG_20200430_005855.jpg

    So Is there Any way to fix this problem
    Plz help me IMG_20200430_005801.jpg IMG_20200430_005835.jpg IMG_20200430_005855.jpg
     
  2. KaHeer

    KaHeer

    Joined:
    Nov 19, 2018
    Posts:
    5
    You need to change the pivot on the transform of the object with the grid layout group.
     
    Rhein-Bytes likes this.
  3. Kinnith7

    Kinnith7

    Joined:
    Jul 4, 2017
    Posts:
    81