How might you handle a situation like this:
You have items in your game that can be picked up by player and stored in inventory.
Most data about items can be got from a data table. But some variables might subject to continual change, like a “food spoilage” variable.
You might have a “Food” blueprint class that holds the “spoilage” logic.
For items that don’t have any logic like that, the only thing we need to do to transfer data about them from one place to another is some form of ID. Since all of the associated data is static, we can just lookup in a data table to get the values we need.
But if you need that food spoilage timer to keep decrementing the “spoilage” variable on a single food instance, then I think there is no choice - you have to actually keep an actor instance in the game and save/load that, right? Otherwise, how does the food spoilage logic keep running?
The simplest idea to come to mind is that, if player picked up an apple instance, for example, we’d just hide the static mesh and attach the apple actor to the player character, while also representing it in the inventory. It seems kinda stupid and literal, but how else do we keep the instances logic running?
I’ve heard of object pools. Is that the idea for a problem like this?