Show Gui button as hovered with custom mouse position

I’m using a custom mouse pointer that does not use the OS mouse position. This creates problems with the Unity Gui system, sepcifically buttons as they check for the actual mouseposition to display as Hovered and be clicked etc.

I was wondering if there was a way to check the GUI.Buttons with a custom mouse position such as mine, or if you can manually display a GUI.button as hovered (as it appears in the GUIStyle), in which case I could make a custom mouse over check as well.

EDIT: Seems I was being unclear. I want to use the Unity GUI system but I want to manually trigger the hover and active states of the GUI elements, instead of them being triggered by mouse over and clicked.

you can use Onmouseenter and onmousehover also it will help you to your coustom

I think this is what you want to know. First, you will need to know the current position of mouse.

function OnGUI () 
{
var e : Event = Event.current;
Debug.Log(e.mousePosition);
}

So now you have it. Set that position x and y for the GUI.Box.

// Inside the function OnGUI
GUI.Box (Rect (e.mousePosition.x, e.mousePosition.y, 100,100), "");

Hope this helps. Enjoy!