c# - Unity Navigation NavMeshAgent -


so worked fine before updating unity, after updated keep getting 2 error

unityengine.ai.navmeshagent.resume()' obsolete: `set isstopped false instead'

unityengine.ai.navmeshagent.stop()' obsolete: `set isstopped true instead'

this code

public class navigation : interaction { public float relaxdistance = 5;  private navmeshagent agent; private vector3 target = vector3.zero; private bool selected = false; private bool isactive = false;  public override void deselect() {     selected = false; }  public override void select() {     selected = true; }  public void sendtotarget() {     agent.setdestination(target);     agent.resume();     isactive = true; }  void start() {     agent = getcomponent<navmeshagent>(); }  // update called once per frame void update() {     if (selected && input.getmousebuttondown(1))     {           var temptarget = rtsmanager.current.screenpointtomapposition(input.mouseposition);          if (temptarget.hasvalue)         {             target = temptarget.value;             sendtotarget();         }      }      if (isactive && vector3.distance(target, transform.position) < relaxdistance)     {         agent.stop();         isactive = false;     }  }} 

my prefabs have have navmeshagent , rebaked terrain.. need point in right direction or hint

just errors , change agent.resume() agent.isstopped = false , agent.stop() agent.isstopped = true.


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -