gameobject.findgameobjectswithtag code example
Example 1: unity find objects with tag
//Find a single game object
GameObject.FindWithTag("TagName");
//Find multiple game objects from tag
GameObject.FindGameObjectsWithTag("TagName");
Example 2: unity get all by tag
GameObject[] arrayGo = GameObject.FindGameObjectsWithTag("myTag");
Example 3: find gameobject with tag
GameObject.FindWithTag("Enemy");