title: Array index out of range?
body: <p>I have prefabs created, named with <code>0, 1 ... 9</code>.</p>
  
  <p>I want to create a numbers with <code>rigidbody</code> and <code>collision</code>. However I am receiving the exception below:</p>
  
  <blockquote>
    <p>IndexOutOfRangeException: Array index is out of range.
    (wrapper stelemref) object:stelemref (object,intptr,object)
    Spawn_Score.Start () (at Assets/Spawn_Score.cs:17)</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class Spawn_Score : MonoBehaviour {
  
    private Vector3 startPosition;
    private Quaternion startRotation;
  
    public GameObject[] number_object;
  
    public int position;
    public int count;
  
    // Use this for initialization
    void Start () {
      for (int i = 0; i &lt; 9; i++) {
          number_object [i] = (GameObject)Resources.Load (i.ToString());
      }
      GenerateScore ();
    }
  
    // Update is called once per frame
    void Update () {
  
    }
  
    void GenerateScore() {
      startRotation = transform.rotation;
      count = PlayerPrefs.GetInt ("PlayerScore").ToString ().Length;
      for (int i = 1; i &lt; count; i++) {
          //int number;
          startPosition = new Vector3 (2f*i, 5.6f, 0);
          //number = (int)PlayerPrefs.GetInt("PlayerScore").ToString()[i];
          Instantiate (number_object[1], startPosition, startRotation);
      }
    }
  }
  </code></pre>