Unity3D——GetComponentsInChildren()方法详解

最近使用GetComponentsInChildren在作游戏获取孩子节点对象的时候遇到了问题,索性就花点时间理解透彻来,省的下次进坑;总结了三种状况,使用需谨慎。数组 1、能获取到本身的状况spa Transform[] trans = GetComponentsInChildren<Transform>(); 由于root对象以及其6个子对象都有Transform组件,因此获取到的size是7
相关文章
相关标签/搜索