Quantcast
Channel: Answers for "How to correctly use GetComponentInChildren"
Browsing latest articles
Browse All 4 View Live

Answer by Dave-Carlile

[GetComponentInChildren][1] returns a single instance. You're trying to assign the result to an array. Looks like you probably want to use [GetComponentsInChildren][2]. [1]:...

View Article


Answer by Kergal

I would change a couple of things. (but i use C#) . At the moment your your Array is of type component - which is weird (at least to me) . make it Transforms or GameObjects. then in your foreach loop....

View Article

Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>