Quick answer: Advance each item's freshness using the spoilage multiplier of its current container, and recompute elapsed decay when an item moves between containers.
Players build a cooler expecting it to keep meat fresh, but it spoils on the same timer as their pack. Spoilage is being computed globally with no awareness of where the item is stored.
How to fix it
1. Tag containers with a spoil multiplier
Give each storage type a multiplier, like 0.25 for a cooler. Multiply the item's decay rate by it. A flat global rate cannot reward refrigeration.
2. Resolve decay on access, not per tick
Store each item's last-update time and freshness, then compute decay lazily when the item is viewed or moved. This scales to thousands of items without per-frame loops.
3. Settle decay on transfer
When an item moves containers, finalize decay under the old multiplier before applying the new one, so a quick stash in the cooler does not erase prior spoilage.
Catching the ones you can't reproduce
The hardest version of this to fix is the one you can't reproduce — it only happens on a player's hardware, OS, driver, or save state, under conditions that simply aren't present on your machine. A report that says “it crashed” or “it froze” gives you nothing to act on, so the bug survives release after release while quietly costing you players.
Automatic error capture closes that gap. Each failure arrives with its full stack trace, the device and OS, the build number, and a breadcrumb trail of what the player did right before it broke, so even a failure you have never seen becomes a specific, reproducible issue. Fold identical failures into one signature ranked by how many players each hits, and your worklist sorts itself worst-first instead of arriving as a stream of vague complaints.
This is where a tool like Bugnet earns its place. Its SDK captures every Unity error automatically with the full stack trace plus device, OS, memory, build, and game-state context, folds duplicates into one grouped issue with an occurrence count, and ties each to the build it first appeared on — so you fix the problem that hurts the most players first and confirm it is gone when its signature disappears from the next release.
A crash you can name from its stack trace is a crash you can usually fix in minutes.