Search code examples
unity-game-enginengui

NGUI ScrollView performance issue(scroll view is very slow in responding to drag/pan event)?


I have an NGUI Scroll View inside my panel, in which i have an NGUI Texture called YellowBoard(see image for hierarchy). YellowBoard has UIDragScrollView and Boxcollider attached to it

enter image description here

enter image description here

as shown in the image , i have 250 child gameobjects with boxcolliders ( NGUI Buttons - to be more specific) under the "LevelButtons"

MY PROBLEM :-

with this much amount of game objects moving when i drag/pan "YellowBoard" , the responsiveness is very low.

When i keep 100 buttons only, scroll view works fine. but as increase number of buttons scroll view gets more slower.

can some one guide me what alternatives i can use to solve my problem. since i can't reduce the number of level buttons.


Solution

  • Here is my solution: Hide the buttons outside the ScrollView's panel region. Active the buttons dynamically when you drag.