Author Topic: Flickering text on UILabels in scrollview.  (Read 5860 times)

Orfen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Flickering text on UILabels in scrollview.
« on: March 21, 2014, 04:51:19 AM »
Hello, i have an issue with a scroll view and some labels. When the scroll view is moving in any way at all, the UILabel text will dissapear, which results in really annoying text flickering. The way i have it set up, is i have a disabled scrollview panel with a grid as a child, and on some event trigger the grid is populated with articles deriving from a prefab. The prefab has 3 UILabel components, and i have the issue on all 3.
Im using the dynamic arial font unity has, and most of the characters on the labels are greek.  I tried preloading the font like i saw in another post somewhere on here, but it doesn't seem to work. Do you have any idea what might be causing my issue? If you need any more info please let me know.
Thanks in advance!


EDIT: I have no idea how, but something fixed my issue. All i did was try to add panels to each widget getting added to the grid, and then remove the panel.
« Last Edit: March 21, 2014, 05:30:09 AM by Orfen »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering text on UILabels in scrollview.
« Reply #1 on: March 21, 2014, 01:20:13 PM »
Be sure to add your widgets after the scroll view is enabled, and to do so using NGUITools.AddChild.

Orfen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Flickering text on UILabels in scrollview.
« Reply #2 on: March 24, 2014, 03:47:42 AM »
Thats what im doing, but because im adding dynamic content(from a rss feed) to my labels, it seems the text is sometimes too long(i get the error too many vertices in one panel) and thats what causes the flickering.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering text on UILabels in scrollview.
« Reply #3 on: March 24, 2014, 04:12:45 PM »
Disable shadow and especially outline effects on labels. Outline increases the vertex count by 400%. Shadow -- by 100%.

Orfen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Flickering text on UILabels in scrollview.
« Reply #4 on: March 26, 2014, 05:03:31 AM »
Im not using any of the effects as i found some threads where you mentioned the increase.

sb_007

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Flickering text on UILabels in scrollview.
« Reply #5 on: November 23, 2017, 12:39:46 AM »
Disable shadow and especially outline effects on labels. Outline increases the vertex count by 400%. Shadow -- by 100%.

Are these effects not good for scrollview having 100+ items as far as performance is concerned?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering text on UILabels in scrollview.
« Reply #6 on: November 23, 2017, 01:33:11 AM »
When you scroll, assuming culling is disabled on the scroll view, there is no overhead. Nothing gets changed, a single transform simply gets moved, that's it.