Is there a way to uncheck the Navmesh Agent check box programatically? Can it be done using a NavMeshAgent object?

Change to:
[37045-^cdba32e2c5ae2ed507d9b1a11137b27d26c5ce0885a628c92b^pimgpsh_fullsize_distr.jpg|37045]
Is there a way to uncheck the Navmesh Agent check box programatically? Can it be done using a NavMeshAgent object?

Change to:
[37045-^cdba32e2c5ae2ed507d9b1a11137b27d26c5ce0885a628c92b^pimgpsh_fullsize_distr.jpg|37045]
Not go access to Unity at the moment but if the script is attached to the character you want to disable a component on then in c#
gameObject.GetComponent<NaveMeshAgent>().enabled = false;
JS
gameObject.GetComponent(NavMeshAgent).enabled = false;
if the script isn’t on the character the you need to reference the gameObject it’s on with Find or FindGameObjectWithTag.
The above should work just replace gameObject with whatever variable use store the result of the Find.
Like I said not got access to Unity so sorry for any typo’s!
No problem amazed there were no typos as the rest of the post is littered with them. Typing on a phone! You can use the same for any component of a gameObjet so if you have a script called health with a public method called TakeDamage that takes a float use get component for health and replace enabled with TakeDamage ( float 5f); and youve passed 5 point of damage to it.
– Mmmpiesagent.enabled = !agent.enabled
!agent.enabled its not disabling agent always, some other function can activate this again (possible agent.isStopped =false or warp)
i think better stop updating agent (agent.updatePos = fasle, rotation = false and axis)
Go to a flat part of the map. Doesn’t matter if you are on a slope as long as it’s flat. Then, press ~ to open the console. Then, type in the console nav_mark_walkable then nav_generate
Yes, you can use [GetComponent]1 to access the Nav Mesh Agent component and set it's enabled state to false. [1]: http://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html
– Key_Less