// Use this for initialization void Start() { System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); watch.Start(); itm = NavMeshBuilder.BuildTerrainNavmesh(GameObject.FindObjectOfType <Terrain>()); Debug.Log("Terrain built in " + watch.Elapsed); watch.Reset(); watch.Start(); StartCoroutine(itm.OptimizeMesh()); StartCoroutine(Draw()); }