Hey Unity folks! As the title implies I would like to find all root transforms in the scene hierarchy, via a C# script.
Here's the catch: There are a lot of children for each transform.
So far the methods we've found are:
Is there a more elegant way of finding all root transforms in the scene hierarchy?
asked Nov 29 '11 at 01:16 PM
no of course there is no way to quickly search thousands of things for a few specific things.
However its worth asking yourself how these objects get generated to begin with.
If these roots are really important to you you have a few choices.
keep in mind even if the parents are changing its probably less costly to mess with a small array that search a large scene.
answered Nov 06 '12 at 04:34 AM