How to properly design weapons with evolutions (as rachet & clank weapons)

I have this 2 ideas:

  • 1 game object one script with various models( with the current modelattivated and others disabled) for each weapon;
  • Create a new gameobject with a new model and script for each evolution;

How would you design this?

Your first idea would be much more performant as instantiating a prefab or creating a new go will create garbage and it takes time, while having all the gos pre created will cause a slower initialization, but you’ll get a runtime performance.

Whenever i made one of my first FPS shooters (i had 10 different weapons) i pre-created a GO for every different weapon, stored them in a dictionary so i can quick access them by name or keyword. Worked quite nice, no slow initialization + quick switching while in game, as it only takes to enable / disable the GO.