中文
Appearance
Component.gameObject
Component
(只读)当前组件附加到的游戏对象。
游戏对象是场景中的基本构建单元,而组件是游戏对象的功能模块,它们包含了游戏对象的行为和属性。
GameObject
let go = new GameObject(); //为游戏对象添加一个BoxCollider组件 let com = go.AddComponent<BoxCollider>(BoxCollider); com.gameObject;