I’m trying to save and load inventory data, and the way I’m trying to do it is by saving an actor reference of whatever items I pick up into an array, and storing it in a save game.
problem is that when I pick up items, I destroy the actors so they are removed from the world, so when the code tries to populate the inventory using info stored in that array, I get this error, probably cuz the actor was destroyed.
If you’re destroying a recreating things, obviously it won’t be the same.
If we’re talking about blueprints, the can have an ID ( int ), and can monitor the save game situation themselves. Recreating or destroying themselves as necessary.
If it’s just static mesh actors, you’ll need some sort of ‘actor manager’ which controls their location and existence. It might be good if they all had an actor tag, so the system knows to monitor them.