在一些物体初始化的时候需要赋予一些组件 代码其实很简单
Type[] compents = { (typeof(Rigidbody)), typeof(Cloth) };
GameObject obj = new GameObject("a_Huang", compents);
在compents 中你可以添加任意多的组件。
在一些物体初始化的时候需要赋予一些组件 代码其实很简单
Type[] compents = { (typeof(Rigidbody)), typeof(Cloth) };
GameObject obj = new GameObject("a_Huang", compents);