Hey,
I’ve been adding support for UGUI last couple days for my Graph Maker package (link in my sig). So far it has been going great. I’ve managed to reproduce line graphs, bar graphs, pie graphs, custom events, tooltips, animations, etc. without any issues. The only issue I’ve run into that I can’t solve is render order for Image with custom material.
Basically, to create a stacked line graph, I have a custom shader that I created in Shader Forge. This shader handles alpha clipping based on various shader properties that I pass in via code.
I have it working in NGUI, and Daikon Forge (screenshots on asset store product page). For those, I create and set a material on UITexture (NGUI) / dfTextureSprite (Daikon). For UGUI, I’m using Image (tried raw image as well), and I’m basically just setting Image.material = new Material().
Everything seems to work (alpha clipping, color, etc), except for the render order. The render order does not seem to respect ordering of the transform siblings. I have attached a screenshot attempting too show this. In the hierarchy, the series2 object represents the line series with the orange squares, and for this series there should be green rectangles below overlaying the blue rectangles (refer to asset store product screenshot for stacked line graph for what the final result should look like).
So, I do have the series 1 before series 2 in the transform hierarchy, but series 2 is rendering below series 1. If I drag out the position of series 2, I do see the green rectangles.