Hi,
I'm pulling a list of textures from the web and attaching them to UITextures in a scrolling table. I'm running into an issue with memory. So I essentially went the route of Destroying the texture from non-visible cells. This works, but is terribly slow and feels glitchy.
My current system relies on each cell having .onDrag being set. This calls a function that loops through and removes textures from non-visible children. For visible children it ques up a network request (with cacheing) and re-applies the texture.
I know this is horribly inefficient. I've looked into ditching this route and applying a "UIWrapContent" script but this seems to be used only with ScrollViews and I cannot figure out how I can put in "Y" spacing between the cells like I can with a table. The other option was to attach a script or something to the child Widget / UITexture that would notify me when it becomes visible/non-visible. This would cut down on the amount of iterations required on each child when scrolling. I also noticed tables have a .onReposition delegate. But I believe I'm misunderstanding its use as I've not been able to get it working. Any attempts to EventDelegate.Add(table.onReposition, myFunction) fail.
Any help would be greatly appreciated.
Thanks.