获取添加组件

获取组件

gameObject.getComponent<组件>();
gameObject.getComponent(typeof(组件)) as 组件;//利用反射获取,javascript与c#通信


添加组件

gameObject.AddComponent<组件>();

首页 我的博客
粤ICP备17103704号