weapon personalisation *like* for honor

Ok i know that for honor was not developed in unity and it is a AAA game, i was just wondering how to code something like that. i do not mean adding emblems on them but just swapping parts.
i have already set the character model and the pivot and i have already modelled some weapon parts.

This is how I would do it:

  • Create a “part” class (c#-script) with the following:
  • three Vector3 variables, position, scale and rotation
  • string name to display the name, maybe some information text aswell
  • int ID (part ID for coding, every part has an unique ID)
  • A method to equip and unequip this part
  • A GameObject with the position to put the parts in (PartHolder)

You then need a GUI where you can select a part. Depending on the selected part, the part with the ID will be loaded and the “unequip” method of the old part and the “equip” method of the new part is called. The new part now moves itself (or instantiates) as child to the Created PartHolder GameObject.
In the Equip method the part will adjust his position, rotation and scale to the Vector3 values in the script