I created Dynamic Prototype Factory and when I change it’s prototype from script, I get error:
Trying to set ‘/game/object/path.go’ as prototype to ‘some factory’. Only .goc resources are allowed
Here’s the script:
factory.unload("#some_factory") factory.set_prototype("#some_factory",o.game_obj) current_item = factory.create("#some_factory")
Defold specific files in your project are in protobuf text format. When the files are compiled they become binary protobuf files and have a ‘c’ appended to their extensions.
The binary versions end up in the build folder of your project.
Then what should I do with this error?
You should provide it a .goc file, not a .go file. Here’s an example: