check what tag is collider object unity code example
Example 1: how to check the tag of a collider in unity
void OnTriggerEnter(Collider collision)
{
if(collision.gameObject.tag == "[Tag]")
{
//Do Something...
}
}
Example 2: unity check tag
gameObject.tag