Search Unity

Unity UI Very large Scroll view + Table

Discussion in 'UGUI & TextMesh Pro' started by JohnHudeski, May 11, 2019.

  1. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126


    Hi, I am making a sports game that requires lots of tables (Like in the example above) with 20 to 300 entries (rows) per table.
    The view is fully customizable so the user can select what column they want to see. So I decided to have a ui text object for every cell. So if the users wish to see 10 different column/data points and there are 300 entries that would lead to 3000 ui objects. Not only is it slow it seems wrong

    Unfortunately, my naive implementation is a resource hug, pooling doesn't improve the performance just the startup. Any ideas on how to do a smart enable/disable system to preserve my FPS?


    Secondly, as you can see in the video above, my table header vanishes when i scroll down. Is there any way to fix its vertical position while scrolling but allow the horizontal to move with the view?
     
  2. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    So, I fixed the column problem with a second viewport. no vertical scroll bar and it shares the main tables horizontal scroll bar.