Send GUISkin Texture to backward, (see the picture)

HI.
this is my question today,
i have some 3D objects rotating, but
when I use GUISkin appear over the 3D object.
and thats my question
how can I send to back the GUISkin please.
here is picture with 4 steeps.
thansk for any help !

sorry for the picture size. :?

[/url]

You can’t; OnGUI is always on top. Better not to use OnGUI on the iPhone anyway, because it’s kind of slow, so use GUITextures instead.

–Eric

Can i send to back a GUITexture ?
like I need ?
If the answer is YES , could you tellme how please.
any help will be to apreciate !
thanks a lot

Yes, you can get a GUITexture to go to the back like you need, though it’s a little complicated.

The way I do it is with 2 cameras. One that has a GUILayer component and one that doesn’t. The one with the GUILayer component is set to a lower (-2) depth than the main camera and is set to clear to a color. The main camera is set to depth -1 and doesn’t have a GUILayer component, and the clear is set to “depth only”

That should work - it’s a little confusing to get it working right - respond if you can’t get it working as described and I’ll try to explain more clearly or attach a sample.

GUI Camera

  • Depth: -2
  • Clear Mode: Solid Color
  • Has a GUILayer component

Main Camera

  • Depth: -1
  • Clear Mode: Depth Only
  • Does not have a GUILayer component

-jdm

One more note:

Looking at your picture, if your Sword png is also a GUITexture, then the method I described above will not work, but you could modify it slightly like this:

  1. Make both cameras have a GUILayer component
  2. Use ‘layers’ to cull the different objects for the different cameras

That is, make 2 new layers, “background” and “foreground” - tag your background GUITexture with ‘background’ and your sword texture with ‘foreground’, and then set each camera’s culling mask to only render the objects with the appropriate tags.

Hope that makes sense.

-jdm

If you’re using only GUITextures, you just layer them with the Z order, no need for multiple cameras. You only need to mess with cameras if you’re layering 3D objects on top of a GUITexture.

–Eric

And how can i add GUIText over a GUITexture without multiple cameras?

See my previous post.

–Eric

Please excuse my ignorance but i don’t know how to set the Z-Order of GUI Textures and GUI Text.

Set the Z position, as opposed to X and Y.

–Eric

:shock:

I thought Transform is not relevant for the GUI. lol

Its not relevant for the GUI
But GUIText / GUITexture are no gui objects, they are real 3D objects with real 3D positions with billboard behaviour

[quote=“”]
If you’re using only GUITextures, you just layer them with the Z order, no need for multiple cameras. You only need to mess with cameras if you’re layering 3D objects on top of a GUITexture.
–Eric
**[/quote]
**

Are you going to tell to me,
that the first question I said, (I star this post)
It is posible now ?
If I do like you say …

i mean, playing GUITextures with 3D objects ? (leyering?)
or only with GUITextures (leyering?)

thanks one more time for all this valuable help for me !