- Home /
Find number of objects with certain tag
Hi,
Is there a way to find (in javascript) how many GameObjects with a certain tag are currently in the scene?
Or is there any way other than tags with wich I can do this. Tags seems appropriate though.
Thanks in advance.
Comment
Answer by DaveA · Sep 08, 2011 at 10:14 PM
http://unity3d.com/support/documentation/ScriptReference/GameObject.FindGameObjectsWithTag.html and do .Length on the result of that
Thanks DaveA.. Thats exactly what I was looking for, but was unable to find :-) Thanks!
Your answer
Follow this Question
Related Questions
hit.gameObject.tag 2 Answers
Enabling/Disabling Multiple Tagged objects 1 Answer
how to find tags 0 Answers
What is missing from Unity Pro in the Unity Free edition 1 Answer
Does adding many tags in the TagManager decrease performance? 1 Answer