- Home /
 
 
               Question by 
               Garnagar · Oct 30, 2014 at 07:20 PM · 
                guiwebplayermouseposition  
              
 
              How to detect if mouse is over GUI element in Web Player?
Hey guys,
how can I detect wether the cursor is hovering over GUI box (I know its Rect) in the Web Player?
I've tried this:
  Vector2 mousePos = new Vector2(Input.mousePosition.x, Camera.main.pixelHeight -  Input.mousePosition.y);
  if (boxRect.Contains(mousePos)) { Debug.Log("Inside"); }
 
               It works fine in editor but does not do anything in Web Player buid. Any idea how to solve it?
               Comment
              
 
               
              Your answer