Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to check the tag of a collider in unity

void OnTriggerEnter(Collider collision)
{
	if(collision.gameObject.tag == "[Tag]")
    {
 		//Do Something...
	}
}
 
PREVIOUS NEXT
Tagged: #check #tag #collider #unity
ADD COMMENT
Topic
Name
4+7 =