Hi,
It seems that the logic is different when you publish, and that's a pain to debug...
it's NEVER reproduceable when you are playing inside unity?
When I have such case, isolate the instanciation system and try to run it with nothing else.
could it be the input itself that is trigger twice? I would debug that first, have a coutner that show on the UI and you'll increment that everytime, then you'll know if the problem is your input system or else it's further down into the logic.
Bye,
Jean