Hi. and good morning.
my questionis how can I send to the back (leyering) please.
in other words. i am calling a PNG picture and GUISking appear over this PNG.
I need to send the PNG to front, or in reverse send the GUISking to the back please.
I think, and I am quite sure Eric or dreamora will come in here and post the correct answer :o , that you can control the layering by altering the objects z component.
I’m not on my mac right now so I can’t test this, but as far as I remember, the draw order has to do with the order in which you write them in code. For example:
OnGUI()
{
Draw Button
Draw PNG
}
will draw the PNG on top, whereas
OnGUI()
{
Draw PNG
Draw Button
}
will draw the button on top.
Again, I’m not at my mac so I can’t test this and I may have the order wrong, but the idea is that call order makes a difference.
The gui is always on top of everything you do in 3D in case thats the question. you can’t have gui behind 3D
Within the same OnGUI, the order in which you create the objects defines their depth
with multiple ongui, you could use the depth settings on gui to define it.
that beeing said, 2 and 3 are both more or less a no problem on the iphone as you would avoid using ongui for the actual gameplay gui (use SpriteUI / GUIManager instead) but only main menu and multiple ongui are something you will likely avoid completely.