# Failed to get factory prototype resource

**URL:** <https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016>\
**Category:** Questions\
**Created:** [February 17, 2024, 8:28pm UTC](https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016 "2024-02-17T20:28:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stale](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/stale/32/32618_2.png) [@Stale](https://forum.defold.com/u/Stale)\
**Post date:** [February 17, 2024, 8:28pm UTC](https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016/1 "2024-02-17T20:28:48Z")

</div>

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](https://forum-defold-uploads.b-cdn.net/original/3X/1/6/16d01d5a62abff69b56f54fa6b85dc9ed601fa89.png)  
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

```lua
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

---

<div class="post-metadata">

**Author:** ![Chung\_Xa](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/chung_xa/32/34470_2.png) [@Chung\_Xa](https://forum.defold.com/u/Chung_Xa)\
**Post date:** [February 18, 2024, 2:59am UTC](https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016/2 "2024-02-18T02:59:43Z")

</div>

Sounds like this [Lack of information about using dynamic prototype setting for collection factory - #5 by AGulev](https://forum.defold.com/t/lack-of-information-about-using-dynamic-prototype-setting-for-collection-factory/75832/5)

---

<div class="post-metadata">

**Author:** ![PendragonNL](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pendragonnl/32/37658_2.png) [@PendragonNL](https://forum.defold.com/u/PendragonNL)\
**Post date:** [January 7, 2025, 7:26pm UTC](https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016/3 "2025-01-07T19:26:06Z")

</div>

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

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/3/a/3a46e2113be5ba4c351ec4f8c89b435e0d8a262c.png)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [January 7, 2025, 10:27pm UTC](https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016/4 "2025-01-07T22:27:35Z")

</div>

> [@PendragonNL](#):
>
> 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:

> <https://github.com/defold/doc/blob/master/docs/en/manuals/factory.md?plain=1#L239-L255>

---

<div class="post-metadata">

**Author:** ![PendragonNL](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pendragonnl/32/37658_2.png) [@PendragonNL](https://forum.defold.com/u/PendragonNL)\
**Post date:** [January 8, 2025, 6:38am UTC](https://forum.defold.com/t/failed-to-get-factory-prototype-resource/76016/5 "2025-01-08T06:38:34Z")

</div>

Oke ik will do that 😉
