I'm looking to access all game objects with the tag "AmbientControlled" and change a few settings on each one but I want these to be exactly the same. Iv looked around and can't seem to work it!
Can someone point me in the right direction?
You added the solution in your tags. "FindGameObjectsWithTag". What code do you have that is not working?
Answer by Molix
Feb 20, 2011 at 08:08 PM
Try GameObject.FindGameObjectsWithTag. There is an example in the link.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
How to find one object in specific layer?
OnTriggerEnter only if two tags are found?
Identifier for FindGameObjectsWithTag?
Found script for homing missiles, but can't past Null Reference error
Count the contents of the list from FindGameObjectsWithTag