Ivanzinho
21
Q:

unity find objects with tag

GameObject.FindGameObjectsWithTag("Enemy");
7
GameObject.FindWithTag("Enemy");
16
//Find a single game object
GameObject.FindWithTag("TagName");

//Find multiple game objects from tag 
GameObject.FindGameObjectsWithTag("TagName");
3
GameObject[] arrayGo = GameObject.FindGameObjectsWithTag("myTag");
6
yourObjects = GameObject.FindGameObjectsWithTag("Respawn");
7
string enemyTag = "Enemy";
Enemies = GameObject.FindGameObjectsWithTag(enemyTag);
5
if(FindGameObjectsWithTag(Player){
  Debug.Log("FoundPlayer")
  }
1

New to Communities?

Join the community