For an estimated 6 months now we are having problems with invisible sprites.
Likely the UIPanel does not refresh correctly
The problem most notably appears on slow devices that are prone to frame rate hiccups and might have low memory.
Examples would be the iPhone4 and the Nexus S.
On new and fast devices we hardly ever have the problem, if at all.
Things that we use in problematic cases might cause it individually (just a listing, no order implied)
- Enabling a GameObject hierarchy below a UIPanel (i.e. a child branch of the UIPanel becomes active)
- Scaling a sprite Transform up from zero scale as a fade-in with a Unity keyframe animation (we don't use ActiveAnimation.Play, instead we manually sample with UnityEngine.Animation)
- Moving a sprite Transform from off-screen into view (we verified that HideIfOffScreen=false everywhere) with a Unity keyframe animation
- Re-parenting a pooled GameObject into a UIPanel hierarchy
- Probably other causes
Maybe 1. is a necessary condition for all the other cases, because we make extensive use of it, and it might be involved in all problematic cases.
The problem occurs randomly.
When it happens it makes a random selection of sprites invisible. Not always the same sprites, even in the same application execution.
* We also sometimes had invisible sprites inside the Editor that would become visible after manually disabling/enabling it.
* We also had problems with grid items not getting a layout, e.g. they would all remain in the same spot. (we only add objects directly to the hierarchy, and don't use any NGUI helper methods)
Might also be related to
http://www.tasharen.com/forum/index.php?topic=6705.msg57463#msg57463Apparently it can be fixed by calling UIPanel.Refresh after activating branches in the hierarchy. At least it seems to fix it for now.
Using Unity 4.6.1f1 with pro licenses for mobile and Editor.
Is this expected behaviour, or should it just work?