Question: How can i check in script if mouseUp but not on this gameObject?

```
void OnMouseUp()

```

Only works when mouse is on gameObject, is there other function for opposite?

Answer: 
[Input.GetMouseButtonUp(0)](https://docs.unity3d.com/ScriptReference/Input.GetMouseButtonUp.html) is what you're looking for.

You'll need to check for it each `Update` call though, it's not an event.
Cast a ray on mouse up and check for collision with your object.
Your object will need a collider and be tagged with "yourObjectTag" for the example to work.

```
Update()
{
    if (Input.GetMouseButtonUp(0))
    {
        RaycastHit hit;

         if (Physics.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector3.forward, out hit))
         {
             if (hit.collider != null && hit.collider.tag != "yourObjectTag")
                // do stuff here
         }
    }
}

```