在编辑模式下插入脚本

[SerializeField]
GameObject[] gameObjects;
优点 缺点
很好的表现;很好的绩效 对象集合是静态的
便携式代码 只能从同一场景中引用 GameObjects