Author Topic: Draggable Panel Optimization  (Read 3586 times)

umang

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Draggable Panel Optimization
« on: September 11, 2013, 12:20:12 AM »
Hi,
I am working on a game project. and I am using NGUI paid version.

Now My Problem: I have so many items in my UIGrid/UI Table which is scrollable. But only 4-5 items we could see at a particular time on screen. so i want to make all other items setactive (false) so that they do not take load to draw its geometry or other things. is there any way i could do this with NGUI. it should be dynamic means when i scroll items which comes in clip range should be set active true automatically and which goes outside the clip range should be turned off.
any idea?

thanks in advance

chiuan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 6
  • Posts: 11
    • View Profile
Re: Draggable Panel Optimization
« Reply #1 on: September 11, 2013, 09:21:25 PM »
 :)i solved this. you can used MVC to make your limit instance items to adapt datas.when scroll to the End or Top,let the top or bottom item move to bottom&top.

like this struct only 8 instance items. refresh item's ui with data when scrolling..
-top
-1
-2--------
-3   YOUR PANEL CLIPPING VIEW RECT
-4
-5--------
-6
-bottom

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Draggable Panel Optimization
« Reply #2 on: September 12, 2013, 06:32:15 AM »
The UIpanel has a built in culling now that you can enable on it, which significantly improves performance as well. Optimally, you'd make a carousel structure like chiuan mentions - that makes you always only have visibleItems+bufferItems active at any given time.

Oinobareion

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Draggable Panel Optimization
« Reply #3 on: November 15, 2013, 11:28:31 AM »
The UIpanel has a built in culling now that you can enable on it...

Which version of nGUI integrated the culling feature? Sounds very promising to me.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Draggable Panel Optimization
« Reply #4 on: November 19, 2013, 09:43:29 AM »
Honestly, I can't remember. 2.6 I think.