The number of objects with the “Hero” tag is not static. I’m not certain what to use to grab everything. I can create an array of all the heroes using GameObject.FindGameObjectsWithTag(“Hero”) but then I don’t know how to access the variables of each object within that array. Is there a way to access those variables within the objects in the array, or is there a better way to access the variables directly?
When they’re created, have them access your GameManager (which should be a singleton), and have them subscribe to a List. Then, later on when you want to find all HeroStats, your GameManager already has a List of them.