the Getting Started tutorial is correct, the prototype GO that a factory creates doesn’t have to be inside any collection.
Factories create Game Objects whilst the game is playing, so you don’t need to add them to the collection. You have to select a prototype Game Object from your project explorer so the factory knows what to create, but the factory does the rest.
I hope that answers your question (i had a little trouble understanding it!)
Thanks for the answer, but it wasn’t what I was asking.
Hopefully this extra detail will help:
I want to use a game object that is only accessible by a collection’s Outliner. The game object itself is NOT in the Project Explorer since it’s inside a collection.
You have to select a prototype Game Object from your project explorer so the factory knows what to create, but the factory does the rest.
That means that you can only create objects that you have in the project explorer. However, there is an easy solution: create a GO in the project explorer, then copy all the files from the GO that is in your collection into the GO you just created. Then, set the factory prototype to that GO.
@gamedevSITHS There are two ways of adding game objects, by adding them directly via “Add Game Object” (embedding) them, or by creating a separate .go file by right clicking on the project explorer and choose “New → Game Object File”, and then in the collection select “Add Game Object File”
They will look a bit different in the outline. These two objects are the same, but the latter is added from a file.
Game object files are often used to allow for easy edits of properties and behavior, without you having to go through each collection when you wish to change something in the game object itself. A good example are the platforms from the tutorial.
And, if you have a game object file, you can also spawn such game objects via a factory. Each factory needs a “prototype”, i.e. a game object file. See the factory manual for more info.
As for your question, I’m not entirely sure what you wish to do, But you can spawn gameobject1 from gameobject2, if the factory in gameobject2, points to the gameobject1.go file. And vice versa, if the gameobject1 has a factory that points to the gameobject2.go file, it can spawn gameobject2 instances.
I hope this answers at least part of your question?