hierarchy as in edit mode

Hello, I’m trying to create an app for an architecture project and I want to have an hierarchy the same as Edit mode. To show me all the children’s and all the objects in the scene maybe with a specific tag.
For now, I have everything as the Edit mode except this thing.

Not sure exactly what you want, maybe an in-game UI that shows the hierarchy? That will get a little tricky because you’ll need to exclude the UI itself from the UI or else you’ll get an infinite UI bomb. That being said, you can exclude the UI’s root object from the search.
Some things to help you out:
UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects() ← gets all the root objects
Transform.childCount → tells you how many children a transform has
Transform.GetChild(int) → gets the child transform at the given index
So, get all the root object (except the UI root), then recursively go down each transform tree and create UI for each object.

1 Like