Created
January 5, 2012 16:08
-
-
Save tayl0r/1565900 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public GUIText[] m_numbers = new GUIText[100]; | |
void Start() { | |
if (m_timer) { | |
for (int i = 0; i < 11; ++i) { | |
GUIText number = Instantiate(m_timer) as GUIText; | |
number.text = i.ToString(); | |
number.enabled = false; | |
Debug.Log(i); | |
// this is the line with the error | |
// IndexOutOfRangeException: Array index is out of range. | |
// (wrapper stelemref) object:stelemref (object,intptr,object) | |
m_numbers[i] = number; | |
} | |
m_timer.enabled = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment