Ok I see
I change my slot to AWeapon * weaponSlot
and my equip()
will be a generic function for equiping Weapon or Armor (item directly see in world), I need to spawn it before assigning it
but this will work with class derived in BP, by example my test weapon W_test
is a BP extended from AWeapon
, W_test
can assign into the pointer weaponSlot
after spawn ? with cast ?
for the Bag slot, it’s a “garbage” inventory, just SubclassOf can be use here and if the player equip from the bag I can spawn the correct object using the subclass.