A way for a trigger to detect if anything is in it?

Hard to describe what I mean in the title but can you get a trigger to do something if anything is in it. Say that the player is on a space ship with artificial gravity, and if anything enters a trigger in say the power-core then the player gets an upward force to counter gravity. Pretty much you throw something in the core, artificial gravity stops working.

Closest thing I could find is OnTriggerStay but if 20 different objects were in the core wouldn’t it be called 20 times throwing the player upward? I know I could get it to set a property to stop gravity but what if there were 1000 or more objects in the core. Seems pretty costly. Is there a simpler way that will be called every frame so long as something remains in the trigger?

Create a Boolean variable called “IsSomethingInTheCore”, initialised as false. Do your IsTriggerStay() checks and, if there are any objects within the trigger, set the variable to true.
Then, at the end of the update loop, jump the player based on the Boolean value - it won’t matter how many objects there were - just that at least one caused it to be set (which I think is what you’re describing)