Author Topic: UIScrollview becomes very slow on adding more content elements?  (Read 9500 times)

gk

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 7
    • View Profile
UIScrollview becomes very slow on adding more content elements?
« on: December 16, 2014, 12:24:30 AM »
Is there any way i can maintain the same scroll speed no matter how many elements added to the grid of scrollview, the frame rate becomes 3 when i scroll a grid with 1000 elements whereas using 4.6's  frame rate retains 30 rate.So any help on making scrollview fast.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollview becomes very slow on adding more content elements?
« Reply #1 on: December 17, 2014, 02:54:14 PM »
Do you have culling enabled on the scroll view?

1000 elements is generally a lot. You need to consider limiting this, perhaps by adding categories or pages.

gk

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 7
    • View Profile
Re: UIScrollview becomes very slow on adding more content elements?
« Reply #2 on: December 18, 2014, 01:16:48 AM »
Hey,
 Yes I have enabled the "cull" on panel ,but still it does not improve the movement.Ok I will take the suggestion of using the pages and try. Anyways if there is any way still i can improve the efficiency it would be very helpful

Thank you

gk

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 7
    • View Profile
Re: UIScrollview becomes very slow on adding more content elements?
« Reply #3 on: December 22, 2014, 07:19:36 AM »
I combined both NGUI and uGUI to achieve both softness clipping along with fast scrolling no matter any number of elements added

Biggix

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: UIScrollview becomes very slow on adding more content elements?
« Reply #4 on: December 22, 2014, 08:48:24 AM »
I combined both NGUI and uGUI to achieve both softness clipping along with fast scrolling no matter any number of elements added

Can you please share how did you do that? I'm struggling with the same issue  ;)

gk

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 7
    • View Profile
Re: UIScrollview becomes very slow on adding more content elements?
« Reply #5 on: December 22, 2014, 09:27:43 AM »
Yes sure why not,knowledge should always be shared :D,here is the procedure
1.Create a NGUI panel (named ScrollingPanel) if you require the soft clipping of contents
2.Now add unity's Canvas as child to ScrollingPanel.
3.Create a unity's Panel,attach "ScrollRect" component to it.Add this as a child to Canvas
4.Create a GridLayoutGroup for containing the contents of scrolling and attach ContentSizeFilter Script to it.(in my case all grid contents were ngui buttons with uisprite)
5.Event system would be required to take Unity events so let it be child of canvas.