OnTriggerStay with multiple collision parameters

I have a GameObject that needs to detect collisions with 2 other GameObjects simultaneously.

I need to be able to store the 2 GameObjects within 2 variables, which will be used for referencing later on.

The following:

void OnTriggerStay (Collider object1, Collider object2) {

}

does not work, since the OnTriggerStay function only takes 1 or 0 parameters.

To also clarify, I need to use OnTriggerStay because I need to consistently check for the collisions.

Any solutions?

Keep a list of the objects that have collided with your main object. Check that list every FixedUpdate for the items you want to detect simultaneously, then clear the list:

private HashSet<GameObject> m_CollisionsThisStep = new HashSet<GameObject>();

private void FixedUpdate(){
    bool hasObjectOne = false;
    bool hasObjectTwo = false;
    foreach(GameObject go in m_CollisionsThisStep){
        //Set the bools above as you loop through and check the traits of the game objects
    }

    if (hasObjectOne && hasObjectTwo){
        //Execute your logic for simultaneous collision here
    }
    m_CollisionsThisStep.Clear();
}

private void OnTriggerStay(Collider c){
     m_CollisionsThisStep.Add(c.gameObject);
}