GUI.DrawTexture() into a Layer?

Hey All,

I need to draw a GUITexture into a certain layer with a rotation.

I’ve seen I can create a new GUITexture object by GameObject->Create Other->GUITexture. This allows me to put the texture into the layer I want, BUT I have no control over it’s rotation.

I can alternatively call GUI.DrawTexture() (manipulating the GUI’s matrix prior to this to achieve the rotation), but I can’t specify what Layer the texture would be in.

I need the best of both worlds. Is this at all possible?

Many thanks all!

What do you mean by layer ? The GUILayer is related to GUITexture and GUIText, the old GUI system. GUI.DrawTexture use the new one and don’t have layers. If you are talking about getting input events, you need to see buttons or Event.current.button + Rect.Contains.