- Home /
OnMouseUp and OnMouseUpAsButton
According to the docs, OnMouseUp should fire whenever the mouse cursor is released over a collider or GUI object, regardless of whether the mouse was over that same object when OnMouseDown fired. And OnMouseUpAsButton should only fire if the mouse HAS NOT moved off the the object that it over when OnMouseDown fired.
But in testing this today, I find no difference between the two. OnMouseUp fires just like OnMouseUpAsButton does. If I click on object1 and move the mouse (without letting up on the button) over object2, OnMouseUp does not fire. And if I don't move off that object, then both events fire. What gives?
I do have the latest version of Unity 3. I have checked: OnMouseEnter is definitely firing, so I'm over the object when I release the button. Does anyone have a workaround?
Your answer
Follow this Question
Related Questions
Anyone have a double-click script more reliable than mine? 3 Answers
boolean flag problem 1 Answer
C# MOUSE EVENT TOGGLE 1 Answer
mouseup event does not work soon 0 Answers
How do I load a scence upon clicking on and object? 1 Answer