Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Spawned prefabs not fitting scroll rect.

Discussion in 'UGUI & TextMesh Pro' started by daveMennenoh, Jan 22, 2023.

  1. daveMennenoh

    daveMennenoh

    Joined:
    May 14, 2020
    Posts:
    101
    https://imgur.com/gallery/a5LdHHN

    So I have a Scroll Rect named UPClist - in green in the hierarchy view. In the Content area are instantiated prefabs. The lines of data in the view. I need these to fit the content width and they only do on the bottom view - MS Surface resolution which the project is built at. But I have all other UI behaving when the resolution changes as can be seen in the top and middle views. It's just the prefabs that are giving me problems. I have a Vertical Layout Group and a Content Size Fitter on the Content object of the Scroll Rect.

    What do I need to do to always have the spawned prefabs fit the content area?

    Also not sure why my link to Imgur won't work and embed the image here. Sorry.