I'm currently in the process of updating from 2.6.3 to 3.0.8 and I'm running into a little bit of trouble. Our game is fully 2D and we use a series of UIPanels with different Z values to create 'layers'. We use some dynamic, non-atlased UITextures and some ParticleSystems which require the layering things draw in the proper order. In pre-3.0 versions of NGUI this has been dead simple to accomplish. For example, we could have 3 UIPanels: "Panel - Low" at Z = 0, "Panel - Medium" at Z = -10, and "Panel - High" at Z = -20. Then, whenever we needed something that required a new, non-NGUI draw call we just had to make sure it had a Z value above the UIPanel it needed to be drawn above and below the next UIPanel. I don't know how it worked in the background, but everything was automatic. As long as the objects Z value was set appropriately, things drew in the correct order.
Now that we're upgrading to >3.0, this approach appears to have fallen apart. I'm having a hard time obtaining similar functionality as before. The only information I've been able to find so far basically says to create custom shaders for everything that lets us set the render queue for non-NGUI objects. We'll go this route if we have to, but I'd rather skip messing with shaders for now and just have a simple system like we had before.
This leads me to a few questions:
- Is there any built-in way to see render queue on stuff in the editor? I'm assuming from this post that there is not, and I'll have to modify the shaders we're using. We're using the ones included with NGUI, so I'll have to re-modify them each time we update, which is an annoyance.
- How did it work automatically before? This documentation page mentions that everything except the Geometry queue is ordered by distance from the camera, so I suspect this is how it was able to order UIPanels and ParticleSystems automatically in the past. Maybe the new NGUI system interferes with this.
- What is the correct way to handle this sort of layering in NGUI now?
- Most importantly, is there a simple way to make this automatic again?