basic inventory save load

The saving and loading system works but the object icons are not visible, do you know how to fix it?

save system



inventory system





The problem is that you save references to slots, but not the slots themselves…

1 Like

I’m a little new to this, why are the objects saved and not the icons?

Do you reload the map before loading the save? If not, do it. And then you will see that you do not save anything from the inventory.

when you modify a slot you call slot changed which updates the icon. (i assume)

but when you load, which also modifies the slot you havent called slot changed.

1 Like

Following what you said I did this and it works but there is an error in the slot that I didn’t catch anything it stays blank



image

slots can be empty, invalid, so just use an IsValid check

1 Like

It works Thank you very much, I had tried several things but they didn’t help me

1 Like

What’s strange is not that it doesn’t work correctly, but that it works in principle… :thinking:

Can you please print string names (object path string) of objects that you save (Inventory Slots array from component), and do the same when loading (Inventory array from save game).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.