- Home /
 
 
               Question by 
               thereal_mpellegr · Nov 14, 2013 at 10:47 PM · 
                navmeshnavmeshagentruntimebaking  
              
 
              How to know if a navmesh is baked at runtime?
My app uses a navmesh if it has been baked beforehand, but if it hasn't I wanted to be able to tell at runtime that there is no navmesh present. I couldn't find a way to do this through the API, so for now I am doing this:
 var navMeshAgent : NavMeshAgent;
 
 if(!navMeshAgent.SetDestination(Vector3(0,0,0))
 {
     //navmesh doesn't exist!
 }
 
               Is there a better way I can do this?
               Comment
              
 
               
              Now that navmeshes can be baked in real time, this is a real issue. I would like to activate the Nav$$anonymous$$eshAgent only when the Nav$$anonymous$$esh is ready. But there isn't any accessor to get that info, afaict.
Your answer