How can i detect if the player is going through multiple triggers?

Hey, basically, when my player walks past an object it goes through a trigger which is detected through OnTriggerEnter and adds a score. What I want to do is make it so if the player walks past multiple objects the amount of the score gained changes.

How can i detect if the player is going through multiple triggers?

Each trigger should cause a separate call to OnTriggerEnter. Perhaps you could keep a global list of the triggers detected and then process them all at the same time in FixedUpdate(). This way, you would know what set of triggers were hit.

If I understand correctly, OnTrigger and OnCollision are ultimately generated by the physics engine, so each object should only be able to cause one execution per FixedUpdate(). I have not tested this myself.

You can manage the collisions manually in a FixedUpdate using the physics overlap methods , for example if your player uses a capsule collider , you can use Physics.OverlapCapsuleNonAlloc to get the list of all the collisions per frame , iterate over them , and manage the score there instead of doing it once per “trigger” callback.
Note : Keep in mind that since you want to simulate the OnTriggerEnter behaviour , you will need to keep a list of the colliders that are already enter and are still colliding and didn’t exit (and avoid incrementing the score when the collider enter and stays in contact), should be trivial to do

Thanks for the replies everyone.
i ended up using an int and increased it on trigger enter and decreased it on trigger exit. i then checked if the int was more then 1 and changed the score increase as necessary.