- Home /
Knowing when mouse has been released
I have this script where I want to get some variables when the mouse button is down and then use those variables when the mouse button gets released, but only when it gets released after it is down.
I tried using EventType.MouseUp but so far it hasn't worked, I assume because that is true whenever the mouse button isn't pressed.
Answer by henry96 · Aug 28, 2011 at 02:04 PM
u can also use
function OnMouseDown ( ) and function OnMouseUp ( )
cheers!
Answer by Poyer · Aug 28, 2011 at 01:48 PM
I'd suggest trying this kind of thing:
Input.GetKeyDown("mouse 0")
Input.GetKey("mouse 0")
Input.GetKeyUp("mouse 0")
Might work.
Your answer
Follow this Question
Related Questions
OnMouseDown() Doesn't work 17 Answers
Help with resize script 1 Answer
GUI begin vertical, to go Up 1 Answer
When I Re-Spawn in my game, I can't look up or down. How can fix this? 0 Answers
Mouse Hold Down 2 Answers