using System.Collections;
using System.Collections.Generic;
using UnityEngine; public class GetComponent : MonoBehaviour
{
public Transform[] transforms; void Start()
{
transforms = GetComponentsInChildren<Transform>(true);
}
}
GetComponentsInChildren<Transform>(true);//游戏对象下的子物体激活的没激活的都会被拿到,包括游戏对象本身
GetComponentsInChildren<Transform>(false);//游戏对象下的子物体激活的会被拿到,包括游戏对象本身;没激活的不会被拿到
另外,()不写的活默认为false.
												

最新文章

  1. SubversionEdge 变更绑定地址
  2. SQLite Design and Concepts
  3. Qt5 托盘模仿qq闪烁,弹消息框实现
  4. http://www.cnblogs.com/0201zcr/p/4987561.html
  5. [转]GPS纠偏算法,适用于google,高德体系的地图
  6. nexus 2.6需要jdk7才能跑起来
  7. RIA+REST架构实现完美WEB开发
  8. The _imageingft C module is not installed
  9. 用Eclipse 开发Dynamic Web Project应用程序 【转】
  10. GIT学习(二)--&gt;Git分布式的好处
  11. Windows VS下搭建cocos2d-x环境搭建
  12. 批处理bat脚本编写(附详细例子)
  13. jsp解决kindeditor在线编辑器struts图片上传问题
  14. Sublime Text 快捷键--持续更新
  15. 使用Java API连接和操作HBase数据库
  16. postgresql 基础sql
  17. FFmpeg configure: rename cuda to ffnvcodec 2018-03-06
  18. 高危Windows系统 SMB/RDP远程命令执行漏洞 手工修复办法
  19. SSL及其加密通信过程
  20. 4、xamarin forms 设置安卓的toolbar的高度

热门文章

  1. 设计模式11: Flyweight 享元模式(结构型模式)
  2. 编写高质量代码改善C#程序的157个建议——建议19:使用更有效的对象和集合初始化
  3. Header Only Library
  4. php复制目录
  5. 一条命令深度清理你的mac
  6. Launch VINS example (Euroc dataset) in RTAB-MAP
  7. jquery图片切换
  8. Codeforces Round #175 (Div. 2) A~D 题解
  9. vue 利用 v-model 实现 双向传递数据..
  10. 数据结构5.4_m元多项式的表示