[C#] Get name of the object you entered

Hey! I am working on positioning system for my car game but I don’t know how to get name of the trigger object you entered. I need this because my system works like this: currentlap*numberofcheckpoints + currenttrigger
and all triggers are named from 1-100.

Thanks in advance guys!

every MonoBehaviour has name property.

So currenttrigger.name should work

if you’re checking for collision from the currentTrigger, and checking for the car to pass through, just use debug.log(transform.name) and it will print the name of the current trigger