HI folks…!!
i need the output as when mouse over the rect position, i have to stop some execution code
so here i am use the code in my project
my code:
var bool = false;
var rr : Rect ;
function Start()
{
rr = Rect(0,0,Screen.width, Screen.height * (1/6.3));
}
function Update()
{
OnMouseOver();
OnMouseExit();
}
function OnMouseOver()
{
if(rr.Contains(Input.mousePosition))
{
Debug.Log(“i am in”);
bool = true;
}
}
function OnMouseExit()
{
if(!rr.Contains(Input.mousePosition))
{
bool = false;
Debug.Log("i am out ");
}
}
and my problem is i was getting the rect position at the bottom of page, but actual output is needed in top of the scene, please help me to solve this problem
thanks in advance…!!