中文
Appearance
GameObject.GetComponent(type)
GameObject
通过指定组件的类型来获取游戏对象上的组件。
Component
T|null
let go = new GameObject(); //获取游戏对象上的BoxCollider组件 go.GetComponent(BoxCollider);