我是 Unity 的新手。
我有一个我声明使用的 GameObjects 数组
var shades:GameObject[];
现在,我必须使用将其转换为数组
var allShades =new Array(shades);
但似乎gameObjects已经转入Objects,因为我不能再使用了,例如
allShades[index].GetComponent(MyScript);
它给了我这个错误:'GetComponent'不是'Object'的成员
我什至不确定我在这里所做的所有事情,呵呵!
我一直在谷歌搜索,但我找不到解决方案。
有什么帮助吗?谢谢!:)