Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Zenject文档显示将组件添加到GameObject如下所示:
GameObject
但是我的看起来像:
为什么我的似乎添加了一个集合GameObject而不是单个游戏对象?我还展示了一个Identifier,而这个例子没有,我不知道为什么。
Identifier
这是因为文档中的图像已过时。Component 属性已更改为列表,因此如果您将组件添加到列表中,它的功能将与之前的 Component 属性相同。至于标识符,这是可选的,如果您对使用它不感兴趣,可以忽略它。