- Home /
problem with gui
So, I have a button something like this:
if(GUI.Button(Rect(140,800,50,30),"House")){
if (Wood > 24){
placing = true;
Ok, but i want when my mouse is on top of this button to make me a box were i can put some information about my house ....
Can you help me?
Cheers!
Answer by BinaryCaveman · Aug 31, 2010 at 12:47 AM
As stated in the forum, the best way to approach this would be to create the GUI Button, then use
if (new Rect(140, 800, 50, 30).Contains(Input.mousePosition)) { /* create GUI label here */ }
Read more about Rect.Contains()
in the manual here.
Answer by Supremfire · Aug 31, 2010 at 01:16 PM
Ok, I get the idea, thank you for answer.
Comment on the relevant answer if you're replying to someone, otherwise this gets bumped back to the top!
Your answer
Follow this Question
Related Questions
GUI.button and onClick Terrain 2 Answers
hide gui.label after an event 1 Answer
Display Press E to Pickup when mouse over object 2 Answers
Cropped Label Problem - Big Font - Unity3D 1 Answer
Hide GUI Label behind an object? 3 Answers