I having trouble with saving a component . Everything works fine with normal variables.
Here is where i write my data to save file. This event got called whenever there are changes in inventory.
And here is where i retrieve the data from save file. In run time, the data in save file is correct but when i close the PIE and re-open, all component’s data got reset.
You can’t save a component, just like you can’t save an actor.
If you think about it, it’s just a reference, which is a pointer into memory. When you reload, just have the pointer’s previous value. Which doesn’t mean anything.
You have to ‘break out’ what the component ‘knows’ and save all the various parts separately.