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.

I’d suggest trying this kind of thing:

Input.GetKeyDown("mouse 0")
Input.GetKey("mouse 0")
Input.GetKeyUp("mouse 0")

Might work.

u can also use

function OnMouseDown ( )
and
function OnMouseUp ( )

cheers!