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

Unity UI Layout Group messes up layout of prefab in scroll list

Discussion in 'UGUI & TextMesh Pro' started by Kapsalon, Sep 24, 2019.

  1. Kapsalon

    Kapsalon

    Joined:
    Jan 20, 2017
    Posts:
    1
    Hi there, I want my content in my scrollview to expand when clicked (to show more info, similar to the premade option 'UI > Scroll View').

    However, the content in my scroll view exists of prefabs that get instantiated when the game runs. When I apply a vertical layout group to the prefab, the layout gets completely borked to the point where it is nearly unusable (even though it functions correctly: it expands the list when the prefab is clicked when the application is running). See the screenshots for an example.

    As the layout is fixed now, it can't be manually corrected, so it's stuck that way.
    I can't seem to figure out how to fix this issue.

    Any help? Thanks in advance!

    Before applying Vertical Layout Group:
    borkedUnityLayoutGroup_1.PNG
    After applying Vertical Layout Group:
    borkedUnityLayoutGroup_2.PNG