Is this correct like if I want to make an inventory system where the player spicks up the item from the world and it destroys the item and store the items data into the player inventory as data (as to save performance ), then I would have to make a structure array?
Thus if the item be like a gun, consumable, or armor, or even furniture, I would need to use the same structure that would hold all this diverse range of variables that some items wouldn’t be using most of them right?
Or is there another method that I am missing?
Eidt:
The game is to have lots of items so as a way to save performance I thought that when you pick up an item you destory it and save it’s data which in this case a struct, and make a large array of struct as your inventory, however if this is to be a universal inventory that means the struct will need to store data for both a furniture and a gun.