Failed to get factory prototype resource

I’ve realised I’ve gotten an undocumented error around changing the factory prototype at runtime.
I seem to be able to implement this correctly, it is set to load dynamically and it has the correct file path
image
However I have been unable to spawn other than what was the original prototype,
the print says
“/!Main/EnemyObjects/Horf.goc”
and the filepath is
“/!Main/EnemyObjects/Horf.go” (its uncompiled so it should work)

the error I’m getting is

ERROR:GAMESYS: Failed to get factory prototype resource: /!Main/EnemyObjects/Horf.goc
ERROR:GAMEOBJECT: No prototype to spawn from.

which reads to me as a failure to reach the file, but the file path is correct.

I’m on Defold 1.6.4 for reference

Sounds like this Lack of information about using dynamic prototype setting for collection factory - #5 by AGulev

Hello,

With this message i want to say that this information should be in the documents
Somehere here, needs to be stated. if you get error “Failed to get factory prototype resource” add your prototypes to the root game as a proxy collection

Would you mind submitting a PR with the improved docs? The file in question is this one:

Oke ik will do that :wink: