OnTriggerStay2D() for 2 colliders simultaneously

I’m using an OnTriggerStay2D() function that does something while an object in inside the collider (doesn’t matter what). However, sometimes I have another, so a total of 2 colliders that may stay inside that collider. The two colliders are not on the same Game Object. I’m trying like this:

void OnTriggerStay2D(Collider2D other)
{
    if (other.gameObject.CompareTag("Obj1"))
    {
        //do something
    } 
    if (other.gameObject.CompareTag("Obj2"))
    {
        //do something else
    }
}

but do something else just never happens when Obj1 is already inside. How to make a collider sense two colliders at once for OnTriggerStay2D()?

You can’t. At least, not using OnTriggerStay2D which is called once for every collider2D that stays in the trigger for that frame.

You may initialise a List<Collider2D>, add the colliders in OnTriggerStay2D, then in LateUpdate or FixedUpdate (see which ones comes after the calls), do your stuff and reset the List.