Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: umang on September 11, 2013, 12:20:12 AM

Title: Draggable Panel Optimization
Post by: umang 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
Title: Re: Draggable Panel Optimization
Post by: chiuan 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
Title: Re: Draggable Panel Optimization
Post by: Nicki 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.
Title: Re: Draggable Panel Optimization
Post by: Oinobareion 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.
Title: Re: Draggable Panel Optimization
Post by: Nicki on November 19, 2013, 09:43:29 AM
Honestly, I can't remember. 2.6 I think.