Reference all instances of a prefab?
TheHeart = GameObject.FindGameObjectWithTag ("Heart");
I've got a UI element that I want to have access to a script on all instances of a prefab. I'm making TheHeart equal to game object with tag Heart. That is how I thought you did it, but it only selects a single instance of the prefab not every single one. I have no idea how to do it, I wish it was easier to work with prefabs.
Comment
Answer by Robotic_Soul · Sep 18, 2018 at 04:36 AM
You're so close! Just one character off! https://docs.unity3d.com/ScriptReference/GameObject.FindGameObjectsWithTag.html