Quantcast
Channel: Questions in topic: "invokerepeating"
Viewing all articles
Browse latest Browse all 220

IndexOutOfRangeException: Array index is out of range

$
0
0
IndexOutOfRangeException: Array index is out of range, it's my problem with this script at 37th line (GameObject Newaster = Instantiate (aster[spawnObject], spawnPoints [spawnIndex].position, spawnPoints [spawnIndex].rotation) as GameObject;): using System.Collections; using UnityEngine; using UnityEngine.Networking; using System.Collections.Generic; public class Asteroid : NetworkBehaviour { public float timeTospawn = 0.5f; public Transform[] spawnPoints; public GameObject[] aster; public List possibleSpawns = new List(); // Use this for initialization void Start() { //fill possible spawn for (int i = 0;i().mySpawnPoint = possibleSpawns[spawnIndex]; possibleSpawns.RemoveAt(spawnIndex); } }

Viewing all articles
Browse latest Browse all 220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>