How to randomly select a list index

I am writing a script to check spawn points and if there are no children attached i want to instantiate a child object onto it. So far so good the only problem I am currently having is picking a random index on my items list. It is called itemIndex and is located inside the startSpawn().

what i have is int itemIndex = Random.Range (0,(objectsToSpawn.Count - 1)); and it seems to only ever pick the first item in the list.

Here is my code:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Networking;

public class RespawnItems : MonoBehaviour {

public float restockTime;

[SerializeField]
private List<spawnPointInfo> spawnPoints = new List<spawnPointInfo>();

[SerializeField]
private List<objectSpawnInfo> objectsToSpawn = new List<objectSpawnInfo>();

private Terrain terrain;
private Transform thisTransform;
public float curTime;

[System.Serializable]
public struct objectSpawnInfo
{
	public GameObject item;
}

[System.Serializable]
public struct spawnPointInfo {
	public GameObject spawnPoint;
}

void Start() {
	
	curTime = 0f;

	thisTransform = transform;

}

void Update() {
	
	curTime += Time.deltaTime;

	if (curTime > restockTime) {

		StartSpawn();
		
		curTime = 0f;

	}

}

void StartSpawn() {
	
	for (int i = 0; i < spawnPoints.Count; i++) {
		
		if (spawnPoints_.spawnPoint.transform.childCount == 0 || spawnPoints*.spawnPoint.transform.childCount == null) {*_

* int itemIndex = Random.Range (1,(objectsToSpawn.Count - 1));*
_ Spawn(spawnPoints*.spawnPoint, objectsToSpawn[itemIndex].item);
}
}
}
void Spawn(GameObject sp, GameObject item) {*_

* GameObject locObj = Instantiate (item).gameObject;*
* locObj.transform.position = new Vector3 (sp.transform.position.x, sp.transform.position.y, sp.transform.position.z);*
* Vector3 euler = locObj.transform.eulerAngles;*
* euler.y = Random.Range (0f, 360f);*
* locObj.transform.eulerAngles = euler;*
* if (locObj.GetComponent () != null) {*

* locObj.GetComponent ().rot = locObj.transform.rotation;*
* }*
* locObj.transform.parent = sp.transform;*
* if (Network.isServer) {*

* NetworkServer.Spawn (locObj);*
* }*
* }*
}

Your code says Random.Range (1,(objectsToSpawn.Count - 1));. That will never return the first item in the list since indexing starts from 0.

This will return at minimum a value of 1 and at maximum a value of objectsToSpawn.Count - 2 (with 2 int parameters Random.Range only returns int values that are less than the second parameter).

It should be Random.Range (0, objectsToSpawn.Count); if you want it to pick from all objects in the list.