Patrefans
gamedevexperiments from patreon
gamedevexperiments patreon

Make A Game Like Pokemon in Unity | #143 - Abilities 3

🕑 Added 2025-11-16 18:20:42 +0000 UTC
Make A Game Like Pokemon in Unity | #143 - Abilities 3

Comments

Justin Wahlquist

Did a little more digging. Apparently even just changing the value breaks enumeration and causes the error. Using boosts.Keys.ToList() apparently creates a local copy of the collection, so we can safely change things in the loop without breaking it.

Justin Wahlquist

Removing while looping is bad juju! I'm getting "InvalidOperationException: Collection was modified; enumeration operation may not execute." on the loop. Oddly, setting the value to 0 instead of removing does not seem to fix this...


More Creators