I'm getting some really crazy ordering behavior that definitely doesn't match how things worked, and worse doesn't seem to make sense at all. I like to think I've gotten pretty good with NGUI and have a good understanding of what's going on under the hood in most cases. My point is, I don't believe this is purely user error.
I'm trying my best to create some sort of simple way to reproduce this, but I'm realizing it's not consistent. It's almost non-deterministic from the users point of view. Depending on the order things are enabled or disabled, the outcome is completely different. Mind you, this is with depth and z-values set appropriately such that nothing is overlapping the the draw calls should be well defined. Further, the few times I have gotten it down to something reproducible in our own project, as soon as I try to copy it over to a new, smaller project so I can post it here, the problems stop.
My initial description of the problem isn't correct because it can't be easily reproduced. I believe it's a side effect of an underlying problem that I ended up in that situation. Unfortunately, as I said, it's been impossible to reproduce this reliably. The best information I have right now is that it seems to be related to the combination of using UITextures, Render Q set to Explicit and the algorithm for splitting up draw calls automatically. Whenever the UITextures are present, objects start disappearing. Sometimes things disappear after a completely different panel changes.
The main things I have been seeing:
- When disabling and enabling widgets the order of draw calls changes.
- When objects are enabled on one panel, objects on another panel disappear.
- Several Unity crashes when playing with UIPanels.
Here's a
short video with an example. Forgive the quality.
I'm been banging my head against the wall on this for hours and I'm still at a loss as to what the problem really is. I could really use some help to get to the bottom of this. I don't want to post my entire project on the forum, but I'm open to other ways to figure this out.