unity loop through game objects code example
Example: unity loop through all objects with tag
var objects = GameObject.FindGameObjectsWithTag("blah");
foreach (var obj in objects)
{
// whatever
}
var objects = GameObject.FindGameObjectsWithTag("blah");
foreach (var obj in objects)
{
// whatever
}