Destroy Gameobject With Tag Unity Code Example


Example: unity destroy all objects with tag


GameObject[] enemies = GameObject.FindGameObjectsWithTag("Enemy");   
foreach(GameObject enemy in enemies)
{
GameObject.Destroy(enemy);
}

Comments

Popular posts from this blog

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

C Perror Example

Converting A String To Int In Groovy