unity check tag of object code example
Example 1: unity check tag
gameObject.tag
Example 2: get if object has tag unity
if (NameOfGameObject.tag == "A-Tag") {
// some code
}
gameObject.tag
if (NameOfGameObject.tag == "A-Tag") {
// some code
}