Author Topic: Flickering Issue  (Read 13784 times)

Simie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Flickering Issue
« on: November 24, 2013, 06:39:30 PM »
3.0.6 rc3

Video: https://www.youtube.com/watch?v=J_xHKkpDBw8 (Can be hard to see the flickering, since it looks like an artifact of the video itself)

Whenever a widget changes parent, or some other change occurs which causes panels to be refreshed, all the widgets on-screen will disappear for a frame or two before reappearing. This is especially noticeable on iOS, where the refresh seems to take much longer, but also occurs on standalone builds. It doesn't occur in the editor, and doesn't occur anywhere when using 3.0.5. Panel refreshes also seem faster pre-3.0.6.

I also had to manually call UIPanel.Refresh() at times, since it doesn't seem to detect changes in alpha correctly sometimes in 3.0.6. In the video above, the times Panel.Refresh() is being called are when the character cards are pressed and they begin to expand towards the centre of the screen, tweening their alpha from 0.0f -> 1.0f in process, the new alpha value doesn't seem to take effect unless I do something like this before the tween begins:

  1. ContentsPanel.alpha = 1.0f;
  2. ContentsPanel.Refresh();
  3. ContentsPanel.alpha = 0.0f;
  4.  

I can provide more detail if needed.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering Issue
« Reply #1 on: November 24, 2013, 06:57:30 PM »
Do you call UIWidget's ParentHasChanged() to notify them when you reparent them? Refreshing the panel shouldn't be necessary, especially for alpha stuff. Alpha property takes care of marking it as dirty which will cause a refresh on the next update. Perhaps it's related to when you're doing it?

Simie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Flickering Issue
« Reply #2 on: November 24, 2013, 07:09:29 PM »
Here is a video of the alpha bug: https://dl.dropboxusercontent.com/u/3077939/Game/Bugs/alphabug.mp4

That's without the Panel.Refresh() code above before tweening the alpha to 1.0f

I'm using NGUITools.MarkParentAsChanged on the objects which change panel. But the flickering seems to occur whenever the panel refreshes, not just when I call the ParentHasChanged. (And again, it also didn't happen on 3.0.5)

Simie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Flickering Issue
« Reply #3 on: November 24, 2013, 07:21:46 PM »
Here is a video of the alpha bug: https://dl.dropboxusercontent.com/u/3077939/Game/Bugs/alphabug.mp4

That's without the Panel.Refresh() code above before tweening the alpha to 1.0f

Just to add a bit more to this, I just noticed in the video that while I was adjusted the alpha of one panel, another panel's alpha was increases/decreasing. (I definitely had the correct panel selected in the inspector, I can reproduce this 100% of the time). It seems that the draw call for the panels get swapped/orphaned somehow.

Edit: Another video https://dl.dropboxusercontent.com/u/3077939/Game/Bugs/alphabug2.mp4

Video of flickering issue on the iPad: https://www.youtube.com/watch?v=NIOftoElfgo
« Last Edit: November 24, 2013, 07:45:17 PM by Simie »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering Issue
« Reply #4 on: November 24, 2013, 10:26:21 PM »
The only thing 3.0.6 does differently I can think of is that the panel alpha is now cumulative. This means that parent alpha affects all of the child panels as well.

beermoney

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 80
    • View Profile
Re: Flickering Issue
« Reply #5 on: November 25, 2013, 06:05:13 AM »
I also am seeing the same issues with 3.0.6 rc3

appears to work fine in the editor but in release builds (stand alone and web player - I've only checked these) I'm seeing components disappear and for a lot longer than a couple of frames too

Antti

  • Guest
Re: Flickering Issue
« Reply #6 on: November 25, 2013, 06:34:43 AM »
We too experience the UI flickering on 3.0.6 rc3.

Based on some quick testing, flickering seems to be connected to frames when UIDrawCalls are being destroyed and constructed on UIPanel.LateUpdate(). Perhaps when the LateUpdate() is doing full rebuild of UIDrawCalls?

I just guessing here a bit to help.

PebbleBug

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Flickering Issue
« Reply #7 on: November 25, 2013, 11:16:05 AM »
I'm also seeing flickering on iOS now that wasn't there before.

E.g. there is flickering when activating or deactivating components by using SetActive(true/false). However, when I change the alpha to 0 or 1 instead, there is no flickering. (not entirely sure SetActive(false) causes a flicker though)

Best,
Jakko

romeo_ftv

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 4
    • View Profile
Re: Flickering Issue
« Reply #8 on: November 25, 2013, 01:19:04 PM »
the same issue after update to 3.0.6rc3

robrjames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Flickering Issue
« Reply #9 on: November 25, 2013, 05:29:55 PM »
I just upgraded to 3.06 and now I'm seeing flickering. I was using the previous version yesterday and this wasn't happening.
I'm seeing it on iOS builds. I don't notice it in the editor.

It's happening only on those UIPanels where I activate their gameobject. (game object with the panel I have initially disabled).

So I guess a work around would be to have everything enabled off screen and pop / move them into the camera view when needed.


 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering Issue
« Reply #10 on: November 25, 2013, 06:21:47 PM »
I will investigate and fix this tonight.

kofight

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Flickering Issue
« Reply #11 on: November 25, 2013, 09:37:22 PM »
Flickering on android devices too

boofcpw

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Flickering Issue
« Reply #12 on: November 26, 2013, 01:42:04 AM »
I am having this issue on every ios device I have tried (not in the editor). It also happens when building the example scenes.
If it helps, I am adding widgets to the panel at runtime, which appears to break everything pretty badly. This was not an issue until recently.
Hopefully this can be solved as soon as possible  :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Flickering Issue
« Reply #13 on: November 26, 2013, 03:09:17 AM »
I just put up 3.0.6f2 with a fix for this issue. If you still encounter it, just let me know (I'll likely need a repro case).

boofcpw

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Flickering Issue
« Reply #14 on: November 26, 2013, 03:21:14 AM »
You are fantastic :D