- Home /
Question by
knightmar · Feb 08, 2019 at 11:00 PM ·
tagactivatemultiple objectsall
Activating something on multiple objects
Hello, I want for example activate script or child-gameobject of all GameObjects with tag "Player". What should I use? For example GameObject.FindGameObjectsWithTag() is only giving me list of objects in return but how can i use it?
Comment
Answer by 3kWikiGames · Feb 09, 2019 at 12:03 AM
Try using If(GetComponent().CompareTag("Player")) then add those objects to a gameobject array, like this? examplearray[0].add(GetComponent()).
Your answer
![](https://koobas.hobune.stream/wayback/20220612191405im_/https://answers.unity.com/themes/thub/images/avi.jpg)