4
« on: February 04, 2015, 01:29:46 AM »
You say that the Sprite objects are parented to the Grid at run-time and from looking at that hierarchy each Grid is on a different panel. The way nGUI rendering works is that each Panel is rendered completely based on the Panel Depth so all objects (Widgets, Sprites, etc.) on a Panel are rendered before the next Panel.
>Panel 1 (depth 1)
> Sprite A (depth 100)
> Sprite B (depth 101)
> Sprite C (depth 102)
>Panel 2 (depth 2)
> Sprite D (depth 10)
> Sprite E (depth 11)
> Sprite F (depth 12)
Even though Sprite D, E and F have a lower Depth than Sprites A, B and C the Sprites A, B and C will be rendered first because they are on a Panel with a lower Depth. Basically EVERYTHING on Panel 1 is rendered before ANYTHING on Panel 2.
You also said that when you drag and drop the Sprites the order gets messed up and looking at your hierarchy your DragDropContainers and not children of the Paneld they are children of the Root. I think that you need to make some changes to your hierarchy to get the rendering in the correct order.
Hope that helps.