FindChild Recursive (a handy util func) (Patreon)
Published:
2017-11-21 23:56:25
Imported:
2026-06
haven't archived this post yet. have a subscription? use the importer!
Content
Ever wanted to find a child under a GameObject, in recursive fashion, and been super annoyed when there wasn't a function for that? So you sigh, and crack open the editor, and write that logic for probably the tenth time in your codebase? WELL NEVER AGAIN.
Here's a handy dandy extension method that does that for you. Bonus, it even has an optional argument that tries to recursively find a child with the given name AND the given parent. This handles the cases where you've got 2 like-named children in the hierarchy, and want a specific one.
Files
Previews only