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 user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
OnTriggerEnter only if two tags are found?
How to find one object in specific layer?
i have a 2d infinite runner game and I want to get the position of the nearest platform so I could respawn the player there.
Exclude my gameObject tag from FindGameObjectsWithTag
GameObject.FindWithTag (problem with multiple objects)