Get First Object In List

I am building an tower defense. I have a list, that fills when an enemy enters the turrent’s range. But how can I get the first object in the list and then assing it to be the target for the turret?

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

public class Cannon : MonoBehaviour {
	public GameObject projectile;
	public float reloadTime = 1f;
	public float rotateSpeed = 5f;
	public float cooldown = .25f;
	public GameObject muzzleEffect;
	public float errorAmount = .001f;
	public Transform target;
	public Transform[] muzzlePositions;
	public Transform turretBall;
	public GameObject aimHere;
	public List<GameObject> targetList = new List<GameObject>();
	private float nextFireTime;
	private float nextMoveTime;
	private Quaternion desiredRotation;
	private float aimError;

	void Start() {


	void Update (){
		if(target) {
			if(Time.time >= nextMoveTime) {
				turretBall.rotation = Quaternion.Lerp(turretBall.rotation, desiredRotation, Time.deltaTime * rotateSpeed);
			if(Time.time >= nextFireTime) {
	void  OnTriggerEnter (Collider other){
		if(other.gameObject.tag == "AimPoint") {
//			nextFireTime = Time.time + (reloadTime * .5f);
//			target = other.gameObject.transform;
	void  OnTriggerExit (Collider other){
		if(other.gameObject.tag == "AimPoint") {
	void  CalculateAimPosition (Vector3 targetPos){
		//Vector3 aimPoint = new Vector3(targetPos.x + aimError, targetPos.y + aimError, targetPos.z + aimError);
		Vector3 aimPoint = new Vector3(aimHere.transform.position.x, aimHere.transform.position.y, aimHere.transform.position.z);
		if (aimPoint != turretBall.position) {
			desiredRotation = Quaternion.LookRotation(turretBall.position - aimPoint);
	void  CalculateAimError (){
		aimError = Random.Range(-errorAmount, errorAmount);
	void  FireProjectile (){
		nextFireTime = Time.time + reloadTime;
		nextMoveTime = Time.time + cooldown;
		foreach(Transform theMuzzlePos in muzzlePositions) {
			Instantiate(projectile, theMuzzlePos.position, theMuzzlePos.rotation);
			//Instantiate(muzzleEffect, theMuzzlePos.position, theMuzzlePos.rotation);

Like an array, targetList[0].

@mattssonon How would you use an array to select the first object in the list? Or are you suggesting we use an array instead of a gameobject list?

Is it possible to just select the first object from the gameobject list instead of using an array?

Don’t know if this helps but Brackeys has a great tower defense game tutorial. Here is the link,