How many triggers is too many? Do they affect performance too much?

Sorry if this is a stupid question but I currently have like 20 triggers in one scene. I’m pretty sure that isn’t a lot but I will probably end up with hundreds at the end of the whole project so I’m worried if using triggers is a bad practice. I’m sure I can work around using triggers to start events if need be. Thank you in advance for any response.

Depending on your target platform, hundreds of triggers will probably be fine, and is generally a good practice over writing your own physics simulation. The Physics subsystem is very optimized.

It updates on the fixed timestep interval, which you can set through Project Settings > Time > Fixed Timestep. This is a different interval than Update(), which gets called every time the frame is redrawn.

OnTriggerEnter() and OnTriggerExit() only get called on the fixed update where the colliders enter or exit triggers, not every frame. OnTriggerStay(), on the other hand, gets called every fixed update that the colliders are in contact, so you generally want to avoid it.

One thing that will really hurt performance is if your static triggers move (including just rotation) and don’t have rigidbodies. If you’re going to move a trigger, attach a rigidbody.

The Rigidbody Sleeping page has more information on this and tips for static triggers and other physics objects.