I am trying to dynamically change the prototype of a Factory (with the “Dynamic prototype” set to true). Let’s say I am randomly choosing between spawning enemyA.goc and enemyB.goc.
Problems/weirdness I am running into:
-
I cannot leave the prototype path blank on the factory. The game would not run as it has an error saying I need to assign something. I could assign enemyA.go or enemyB.go here, but seems weird to me that I have to assign something to it if it’s already marked “dynamic prototype”, indicating that it’s intended to be changed at runtime?
-
Let’s say I assign enemyA.go as the factory prototype. Now building the game does not generate enemyB.goc in the build folder, and I am guessing because nothing in the game is referencing enemyB.go. Am I supposed to explicitly reference all the .go / .collection that I want to dynamically assign to prototypes? If so that seems really cumbersome. What am I missing?
Thanks!