- Home /
Question by
nopogo · Sep 29, 2012 at 07:20 AM ·
inputmouseonmouseoveronmouseenterscreen.lockcursor
The OnMouseOver and OnMouseEnter functions cease to work when screen.lockcursor = true
I've tested this with a new gameobject. Added this code:
function OnMouseEnter (){
Debug.Log("MouseOver");
if(Input.GetKeyUp("e")){
Debug.Log("Pressing e");
if (TestCloseEnough()){
Debug.Log("close enough");
}
}
}
While i have my inventory open, the Screen.lockcursor is set to false so the player can click things and move them around. (Then the prints show up) but as soon as the player exits inventory (i.e. screen.lockcursor = true) the onmouseover just doesn't register anything.
Ive tried this both with onmouseover and onmouseenter
using Unity 3.5.0b6
Comment
Your answer
Follow this Question
Related Questions
OnMouse menu 1 Answer
MouseOver Clarification Please 2 Answers
Check if mouse is down while in Edit Mode 1 Answer
OnMouseEnter not working 6 Answers
Move camera with mouse (2D) 1 Answer