Hi, I’ve followed a tutorial on creating an inventory system, followed it pretty 1 to 1 so my inventory code works effectively the same (https://youtu.be/b2atcZWYi3E?si=ynpmm1xGla5mJQky) and have also already created a working save system in my game. I now want to be able to load/save the stored inventory objects but (being new) can’t seem to figure out how to get it to work. I clasped my hands and prayed it would be as simple as just saving the array, then getting it when loading (screenshots) but expectedly it didn’t work. I couldn’t find anything that would help as I’m not even sure if it’s the saving, the loading, or something in the way the inventory loads the items that is the problem. Help is greatly appreciated.
where are you actually saving it though, ie the SaveGameObject and writing/reading from disk?
it looks ok from what i can see, although dont forget to call OnLoaded on your non Async path.
so to delve deeper, what error/problem are you getting?
I’m not getting any particular errors, the problem is when the game is saved, closed then loaded the items I picked up and had in my inventory aren’t there anymore. The question is quite general as they are stored in an array, and I don’t know how to save and load arrays at all (or even print them for debugging for that matter), so I’m not sure where the problem lies. The youtube video I linked is the inventory tutorial I followed so that may help but I’m not sure. I have to sleep now so I may not respond for a bit.
so what calls LoadGameData?
youre calling a dispatcher OnGameLoaded, but who is listening and do they exist at that point?
do the Casts fail?










