Hello everyone :)
Is there a way that you can create a GUI that has the position of the mouse?
E.g:
function OnMouseOver ()
{
//Set stuff to true;
}
function OnGUI ()
{
if(stuff)
{
//Set GUI at mouse position.
}
}
I do know how to create the GUI and all that but, I have no idea how to create the GUI at the position of the mouse.
Can you please help me? :)
efge
2
You could use Input.mousePosition to get the position in pixel coordinates (screen coordinates) and then use this values to draw your GUI.