Hey all
I have an NGUI window with an animation which plays each time the window is shown. I am essentially animating the alpha colour of two sprite objects. Whilst this looks great I was experiencing a rapid flicker for a split second at the start of the animation.
It seems that this was caused because upon enabling my window object, NGUI updates its mesh representation of the window from its last known state, then the animation kicks in and tweaks the values, then NGUI re-updates to the new known state.
So I thought I would share my workaround should anybody else need to know:
- Insert a keyframe at the very start of your animation for each widget which experiences some sort of flicker (or for some shared root object) to deactivate the game object.
- In the next animation frame, setup the initial alpha colour. The widgets are deactivated, so no flicker will occur whilst making this change.
- In the next keyframe re-activate the game objects again.
The above steps remove he unsightly flicker simply by introducing two keyframes which elapse almost instantly.
I hope that this helps future readers