Game object in main.collection or in main folder?

I’m brand new to Defold and working through the war battles tutorial: https://github.com/defold/tutorial-war-battles

I’m at the part where I am creating a Rocket game object/factory. I understand the need for the factory - to create many instances of rockets. I am confused about why the initial rocket.go needs to go in the main folder and not in the main.collection? Why can I not create a rocket game object under main.collection and then reference that from the player game object under the main.collection?

Do all “blueprint” objects go in the main folder?

Thanks!

A game object that you spawn from a factory component has to have .gameobject file.

No, the location on disk (the asset tree is irrelevant). You can put things where ever you want and you can move things around later and all reference will be automatically updated.

4 Likes

ok, I see. Thanks very much!