I can call collectionfactory.create() from main.script and spawn a collection without an issue. But since the prototype collection has only one game object in it, calling the collection feels strange. So instead, I have tried to replace my circleFactory with a regular factory that would point the circle object as a prototype. However I don’t see any other game objects in the prototype section, so I can’t do this. I’ve come across some older posts about prototypes not appearing in the list, so I’ve tried restarting the editor multiple times to no avail.
So most likely, I’m doing something wrong in the way I’m arranging things. My end goal is to spawn/destroy/modify objects created via the factory in my main.script.
Hopefully someone can point me to the right direction!
Do you think that you can zip the game and post it here so that I can take a look at it. This seems like a weird issue, mat maybe there is a small little hiccup you’re forgetting.
Update:
I was able to set the factory prototype to an object if the target object is not in a collection, but it’s standalone in a folder. Is this the expected behavior?
Yes, some assets need to exist as files on disk in the Asset Panel. The factory component expects a game object file (eg foobar.go), the collection factory and collection proxy expects a collection file (foobar.collection). And when you want to add a particle effect to a game object or gui you need to create a particle effect component file (foobar.particlefx). There are other similar examples of components and files that need to exist on disk as opposed to certain more lightweight components that can exist inline in a collection.