Index was outside the bounds of the array

Here are some notes on IndexOutOfRangeException and ArgumentOutOfRangeException:

http://plbm.com/?p=236

Steps to success:

  • find which collection it is (critical first step!)
  • find out why it has fewer items than you expect
  • fix whatever logic is making the indexing value exceed the collection
  • remember you might have more than one instance of this script in your scene/prefab

ALSO: screenshots of code are NOT A THING.

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly