Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: justinISO on October 16, 2013, 09:01:33 AM

Title: Label text optimization
Post by: justinISO on October 16, 2013, 09:01:33 AM
I am running into the "too many vertices on one panel" issue, and it is because our client has this long scrolling Terms of Service page he wants in the app that has a large amount of text on it. Is there a way to flatten or optimize this long label so it can work? Or a different method of doing large amounts of text anyone has used?

Thanks,
Justin
Title: Re: Label text optimization
Post by: broken on October 16, 2013, 12:46:48 PM
Also interested in this. You can of course do pagination, but for some tasks it is not suitable. What are other ways to keep a lot of text?
Title: Re: Label text optimization
Post by: ArenMook on October 16, 2013, 01:07:10 PM
Enable the "Cull" option on the scroll view's UIPanel.
Title: Re: Label text optimization
Post by: cissyhope on December 18, 2013, 10:04:38 PM
Enable the "Cull" option on the scroll view's UIPanel.
Hi, I have similar problem. We are using the latest version, and I have tried "cull" enabled. It seems that culling is working by widgets. So when I have lots of widgets, some are not visible then it will be culled. But in this case, we only have one UILabel, which is very long with lots of content, part of this label is visible, while lots of other part are not, then it won't be culled. Proof is the vertice number is always 60k, it won't change no matter which part I drag. And UIWidget.UpdateGeometry and UIWidget.WriteToBuffers will cost lots of time which will cause dramatic fps drop.

Can I have solution to this problem or have I missed some important setting or not use it properly?
Title: Re: Label text optimization
Post by: ArenMook on December 19, 2013, 12:01:19 PM
You need to split up your epic label into multiple ones. Consider using paragraphs.
Title: Re: Label text optimization
Post by: cissyhope on December 20, 2013, 12:04:27 AM
You need to split up your epic label into multiple ones. Consider using paragraphs.
Thanks for your quick reply. Yes, I'm thinking of this as well. Does paragraphs refer to something special here? My plan is to write some code to parse the text and split them into several labels, no automatically way right?
Title: Re: Label text optimization
Post by: ArenMook on December 20, 2013, 11:47:35 AM
Yup, exactly that. UITextList does this too. In fact, you could just use UITextList yourself. Check the chat window example.