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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Grid layout + Content size fitter problem

Discussion in 'UGUI & TextMesh Pro' started by JaviOverflow, Aug 1, 2015.

  1. JaviOverflow

    JaviOverflow

    Joined:
    May 22, 2015
    Posts:
    12
    I'm trying to implement a regular shop. I followed this scrolling live tutorial https://unity3d.com/learn/tutorials...ating-scroll-lists-at-run-time?playlist=17111 but instead of using vertical layout, I'm using grid layout.

    In order to give inner content panel a size, i'm using content size fitter component. The problem is that when menu is inflated, the content panel is centered vertically instead of matching rectransform content upper bound with rectransform scrollrect upper bound.

    To sum up, this is what I want:


    And this is what I get:


    These are the components on my Content Panel


    And these are form Scroll List:


    I don't know what I'm doing wrong... I tried lots of different configurations and I can't make the content panel grow only to the lower side.

    Thanks!!
     
  2. JaviOverflow

    JaviOverflow

    Joined:
    May 22, 2015
    Posts:
    12
  3. sz-Bit-Barons

    sz-Bit-Barons

    Joined:
    Nov 12, 2013
    Posts:
    150
    as described in the video, you have to set the pivot of "Content Panel" to Y = 1.
     
  4. JaviOverflow

    JaviOverflow

    Joined:
    May 22, 2015
    Posts:
    12
    It worked thanks! I must listen more carefully next time..