S
S
Sergey Serega2019-08-23 17:49:21
Unity
Sergey Serega, 2019-08-23 17:49:21

How to get all child objects as a list?

How to get all child objects as a list or dictionary, including the entire hierarchy (children of children, etc.)? In cases with a dictionary, the key will be the path of the object in the hierarchy. For example, I want to save all references to objects from the Canvas, so that later I can enable and disable the necessary

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2019-08-23
@SirSerega

Go recursively through the childs and form a dictionary. As far as I remember, there are no ready-made methods that produce a dictionary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question