Enemy patrol script using NavMeshAgent
Your indentation and Java-style braces make it very hard to follow. Compare this:


void Patrol() {
            Vector3 Position = transform.position;
            if (patrolPositions != null &amp;&amp; patrolPositions.Count &gt; 1) {
                    Vector3 Destination = patrolPositions [patrolPositionIndex];
                    if (Destination != Position &amp;&amp; CurrentDestination != Destination) {
                            Debug.Log (String.Format ("Patrol plotting route to {0}", Destination.ToString ()));
                            navMeshAgent.SetDestination (Destination);
                            CurrentDestination = Destination;
                            isAtPatrolPosition = false;
                    } else if (Destination == Position &amp;&amp; !isAtPatrolPosition) {
                            isAtPatrolPosition = true;
                            Debug.Log (String.Format ("Patrol waiting {0} seconds", PatrolHoldTime));
                            StartCoroutine (Wait (PatrolHoldTime));
                    }
            } else if (Position != StartPosition) {
                    navMeshAgent.SetDestination (StartPosition);
            }
    }



to that:

void Patrol() 
{
    Vector3 Position = transform.position;
    if (patrolPositions != null &amp;&amp; patrolPositions.Count &gt; 1) 
    {
        Vector3 Destination = patrolPositions[patrolPositionIndex];
        if (Destination != Position &amp;&amp; CurrentDestination != Destination) 
        {
             Debug.Log(String.Format("Patrol plotting route to {0}", Destination.ToString()));
             navMeshAgent.SetDestination(Destination);
             CurrentDestination = Destination;
             isAtPatrolPosition = false;
        } 
        else if (Destination == Position &amp;&amp; !isAtPatrolPosition) 
        {
             isAtPatrolPosition = true;
             Debug.Log(String.Format("Patrol waiting {0} seconds", PatrolHoldTime));
             StartCoroutine(Wait(PatrolHoldTime));
        }
    } 
    else if (Position != StartPosition) 
    {
        navMeshAgent.SetDestination(StartPosition);
    }
}




I'd remove this comment:

// Use this for initialization


And I'd avoid #region blocks - you're not showing your entire class, but regions are typically a sign that too many things are going on, and can often be extracted into their own class (or method, when the region is defined within a method's body).



I don't understand why a method called Wait would return an IEnumerator, and it seems a bit counter-intuitive that Wait would have the side-effect of changing the patrolPositionIndex - could the method have a more descriptive name?



These initializations are redundant, since they're initializing to the default value for their type:

private NavMeshAgent navMeshAgent = null;




public float StoppingDistance = 0.0f;




public float PatrolHoldTime = 0.0f;




private int patrolPositionIndex = 0;




private bool isAtPatrolPosition = false;