Search Unity

Can't figure out resizing in Scroll View

Discussion in 'UGUI & TextMesh Pro' started by diggyk, Aug 13, 2020.

  1. diggyk

    diggyk

    Joined:
    Aug 16, 2014
    Posts:
    24
    I've read a bunch of blogs and I still can't quite get this to work.

    I have a Scroll View and I want to populate the content with other UI prefabs (which are just two text elements: one of the left and one on the right).

    My Content has a Vertical Layout Group and a Content Size Fitter set to Preferred for both horiz and vert.

    The prefab has a panel and a Horizontal layout group and a content size fitter.

    What I see is 1) everyone thing on a single line in the Scroll View and 2) none of it positioned or stretched as expected.

    What I want is for the prefab in Contents to be stretched horizontally and the text elements in it to be stretched as well with the left text anchored left and the right text anchored right. Is there a video tutorial that does something like this? I've only found ones that add Text direction to Content.