Home Creators Posts Import Register Favorites Logout
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

using UnityEngine;namespace SpartanFist{ public static class GameObjectE - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Comments

No comments found for this post.