Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: AlexSudnikov on November 03, 2014, 07:25:18 AM
-
Hi there ,
Well the thing is that i've got a scrollable panel implemented via UIScrollView and UIGrid. I also have a script adding instantiated elements ( buttons ) to the grid. Before adding new set of elements i remove current elements with UIGrid::RemoveChild method and then destroy removed elements. Once new elements are added , i call UIGrid::Reposition method.
The problem is that there are weird gaps left in grid once new elements are added...
Any tips are greatly appreciated.
Thanks!^^
-
You need to use NGUITools.Destroy to remove items. Otherwise they are still here. Unity doesn't remove items until the end of the frame.
-
Thanks!