NavMesh Agent won't move

Hello there!

I know, there is lots of these question out there, but I just don’t find any cause for this problem:

The NavMesh agent won’t move at all! As you see in the image, everything seems to be calculated correctly, but nothing happens. Here is the GameObject of the Agent:

Also, this is the attached script:

using UnityEngine;
using System.Collections;

public class TestNav : MonoBehaviour {

    	// Use this for initialization
    	void Start () {
            GetComponent<NavMeshAgent>().destination = GenerateRandomPosition();
        }
    	
    	// Update is called once per frame
    	void Update () {
    	
    	}
    
        Vector3 GenerateRandomPosition()
        {
            Vector3 ret = new Vector3();
            ret.x = Random.Range(-15f, 15f);
            ret.z = Random.Range(-300f, 300f);
            ret.y = 0.5f;
            return ret;
        }
    }

Does anybody know what the problem is?

@MarkusA380
You sets the destination before you have a destination. The start method is the first your script is going through. So first you sets the destination to nothing and then you sets a destination, but you don’t set the NavMeshAgent to that destination.

Try to set the NavMeshAgent destination in the Update method instead.