从子对象中按名称查找 GameObjects

Transform tr = GetComponent<Transform>().Find("NameOfTheObject");
GameObject go = tr.gameObject;

如果没有找到,Find 将返回 null

优点 缺点
搜索范围有限,定义明确 字符串是弱引用