unity foreach (gameobject with tag) code example Example: find gameobject with tag GameObject.FindWithTag("Enemy");