Hi all,
I have a simple question and I feel like the answer is right in front of me! I’m trying to grab a group of objects with a specific tag, get a specific script on them, and execute a function for just those objects. Here is what I have:
foreach(GameObject myShapes in GameObject.FindGameObjectsWithTag("tree"))
{
prismscript prismScript = myShapes.GetComponent<prismscript>();
prismScript.Solved();
}
I’m trying to find objects with that tag and activate the “Solved()” function, but this is only doing it for one of them. How do I make it happen for every object?
EDIT: nevermind, something else was messed up. NEVERMIND!!!