76
NGUI 3 Support / Re: NGUI Performance questions
« on: August 13, 2012, 11:14:38 PM »
Simon129, can you explain to me that works?
So you only have enough items to fill the window and as you drag, you simply scroll all the contents of the viewable by 1?
The shift and unshift part, you move the outside of the drag area?
eg I have items scrolling in the X direction, so I should move all the items outside of the area each side by say about 500 (or a huge number) in the Y direction and then just put them to 0 in the Y direction when they are viewable inside the panel?
Not quite sure I understand your explanation. Sorry about that
By the way, instantiate is very slow isn't it. What I have been doing is creating 100 items, and then just deleting the objects I don't need. Deleting items is incredibly fast and it seems better doing that than instantiating at all.
So you only have enough items to fill the window and as you drag, you simply scroll all the contents of the viewable by 1?
The shift and unshift part, you move the outside of the drag area?
eg I have items scrolling in the X direction, so I should move all the items outside of the area each side by say about 500 (or a huge number) in the Y direction and then just put them to 0 in the Y direction when they are viewable inside the panel?
Not quite sure I understand your explanation. Sorry about that
By the way, instantiate is very slow isn't it. What I have been doing is creating 100 items, and then just deleting the objects I don't need. Deleting items is incredibly fast and it seems better doing that than instantiating at all.