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