Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

Yeah that was the problem, you just managed to explain it much more elegantly than I could. If you are using the Unity physics engine for it, perhaps keeping an array of the GameObjects for each food type that gets dropped from a container, and when that container is about to drop again, it deletes all the still-existing items in that array? Just brainstorming

(+1)

The simpler solution is to just add the DestroyFood() behavior to the doors (it'd be less memory intensive that way too, though keeping a list wouldn't be too intensive either). As food doesn't spawn touching the doors and it would clear it away if it got stuck. Though like I said, I'd much rather not change it as I like it with it in the game, more chaotic.