- Home /
Gui overlapping camera on camera
How would I make it so that a gui texture overlapped a minimap in the corner of the screen (I am using a camera for the minimap). I have the gui texture, but it is on the normal camera layer, and not going above the minimap camera. I don't want the texture all the way ontop of the minimap, but I want it overlapping a little. I have other gui textures appear sometimes, so I deactivated the guilayer on the minimap. What should i do?
Answer by The_r0nin · Jan 17, 2011 at 09:21 PM
Use the UnityGUI instead of a GUITexture. Then you are writing directly to the screen coordinates:
var myImage: Texture2D; // Drag your texture here in the Inspector
function OnGUI(){ GUI.DrawTexture(Rect(0,0,20,200),myImage); }
I need to click on it and have it follow a script, but I can't when I use this.
You never said that. Change GUI.DrawTexture to "if (GUI.Button(Rect(0,0,20,200),myImage)){" and put your code on the click inside the if statement.
Your answer
Follow this Question
Related Questions
GUIs overlapping other GUIs 2 Answers
Quick GUI Texture Question 0 Answers
GUI box texture resizes itself 1 Answer
Problem With GUI Circle Thickness 0 Answers
9-Sliced Legacy GUI 2 Answers