NokiMo
gamedevexperiments
gamedevexperiments

patreon


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

In this video, we'll implement that prevent stat loss. We'll be implementing abilities like Keen eye, Hyper cutter, Clear body, White smoke, etc.

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

Comments

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...

Justin Wahlquist


Related Creators