Quantcast
Channel: Answers for "Find children of object and store in an array"
Browsing all 5 articles
Browse latest View live

Answer by AlwaysSunny

Based on your questions I've seen here, you'd really benefit from spending an afternoon in the Learn Unity area of the website, where lots of tutorials address a ton of beginner's questions while...

View Article



Answer by BoredMormon

For a one line method to get the array Transform[] children = GetComponentsInChildren(); Transform is also enumerable. So you can avoid the array altogether with: foreach (Transform child in...

View Article

Answer by AlwaysSunny

Based on your questions I've seen here, you'd really benefit from spending an afternoon in the Learn Unity area of the website, where lots of tutorials address a ton of beginner's questions while...

View Article

Answer by BoredMormon

For a one line method to get the array Transform[] children = GetComponentsInChildren(); Transform is also enumerable. So you can avoid the array altogether with: foreach (Transform child in...

View Article

Answer by mzr_developer

List children = new List(); void Start() { foreach (Transform t in transform) { children.Add(t.gameObject); } }

View Article

Browsing all 5 articles
Browse latest View live




Latest Images