top of page

Get all the Children in Transform even if the Children are inactive

  • thetperson314
  • Apr 13, 2023
  • 1 min read

Updated: Apr 29, 2023

When using


GetComponentsInChildren<Transfrom>()

You get the transform children but only the child objects that are currently active in the the hierarchy, but what if we want to get the inactive ones too? Most developers I know, are getting all of the objects on the start of the scene and disabling the object they want to be inactive.


but there is no need for it!


To get component of the inactive objects too you can just use



GetComponentsInChildren<Transfrom>(true)

And that's it, pretty easy right?


If you find this useful, there are 2 other things you can do like this, but as a YouTuber (😜) I have to send you to

and to My Patreon page for the second one (it's a free post)


 
 

Recent Posts

See All

FAVORITES

WHAT'S NEW?

The site is up and running, if let me know that you thing about it 😊

IN THE NEWS

I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me and you can start adding your own content and make changes to the font.

CONTACT ME

Use any social media to contact me. For any question about programing and project I prefer using my Discord server

© 2021 by Amit Klein. Nerd Head.

bottom of page