Arun Sivam
20
Q:

how to find the tag of an objecdt in unity

//Find a single game object
GameObject.FindWithTag("TagName");

//Find multiple game objects from tag 
GameObject.FindGameObjectsWithTag("TagName");
3
string enemyTag = "Enemy";
Enemies = GameObject.FindGameObjectsWithTag(enemyTag);
5
if(FindGameObjectsWithTag(Player){
  Debug.Log("FoundPlayer")
  }
1
gameObject.tag
1

New to Communities?

Join the community