Optimize Scroll list on Unity

3.3k views Asked by At

I'm quite new to Unity. I'm making GUI on Unity and having trouble with the scroll list. I have a prefab of list item. Besides, I get data of around 100 items from server, saved in a List. Now, if a populated data into the Scroll view as normal, I would have to Instantiate 100 instance of list item prefab for the scroll view and this would dramatically reduced the performance of my app. I read on Internet and know there's a technique to handle that, using Object pooling and catch the event of OnBecameVisible/ OnBecameInvisible of each list item. However, there's actually no any example could explain clearly for me.

Anyone could help me to solve this, especially, when OnBecameVisible is called???

0

There are 0 answers