What you will probably want to do is a raycast on MouseUp to get other objects below the mouse
function OnMouseUp()
{
var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit, 100))
{
Debug.Log (hit.collider.gameObject.name);
}
}
You will have to make sure that all of the objects you want to be able to mouse up over have colliders or the raycast won’t work.
That won’t work, but if you do raycasting by using Input.GetMouseButtonUp in Update or whatever, that will. The function OnMouseUp is only for the object that the function is on.
Oh yeah sorry about that, I am used to wrapping all input to a single manager class (which would call MouseUp from Input.GetMouseButtonUp()) and confused the two.