Search Unity

[Request] A tutorial for handling really long scroll lists

Discussion in 'UGUI & TextMesh Pro' started by dakka, Aug 22, 2014.

  1. dakka

    dakka

    Joined:
    Jun 25, 2010
    Posts:
    113
    Really long scroll lists are usually a problem for a GUI.

    Is there a Unity suggested method for handling this type of list in the new uGUI?
     
  2. DESTRUKTORR

    DESTRUKTORR

    Joined:
    Jul 4, 2012
    Posts:
    22
    Have you tried just extending the size of target scroll object to fit the contents? It is quite possible that Unity's systems will manage this appropriately, as-is.
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    If it's really long, you may want to create the objects as-needed via object pooling. You don't want to create 3000 GameObjects to represent your 1000 objects when you are only seeing 10 of them at any one time.
     
  4. dakka

    dakka

    Joined:
    Jun 25, 2010
    Posts:
    113
    Yup true, I was considering a backing class to handle the display of only a few at one time. DFG had a nice implementation for this. I was wondering if Unity have a suggested method and if so a tutorial would be good, since mobile performance is a key topic.
     
  5. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Not yet, I don't think.
     
  6. Raimis

    Raimis

    Joined:
    Aug 27, 2014
    Posts:
    160
    Any news on this one? Currently i'm trying to have a masked list of 20 items. Each item has few states in different game objects (controlled using setactive true/false) and with 20 items i get roughly 30fps in editor. The only solution i found so far is to hide all the objects that are outside of the mask.