Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Problem with updating navmesh at runtime

Discussion in 'Navigation' started by frankmaster329, Dec 29, 2022.

  1. frankmaster329


    Sep 14, 2021
    Im currently using Navivagion.Ai for runtime baking, at the moment im currently facing a issue, when baking the area after destroying a object that same object still gets baked, the problem is that the program is baking to fast, and because of that the program thinks that the object is still there, anyone knows a way of fixing this?
  2. markpudd


    Feb 12, 2022
    I think this is because when the object is Destroyed it isn't immediately removed. The way I resolved this was to deactivate the object before Destroy so the rebake doesn't pick it up. For example:-

    Code (CSharp):
    1.         oldObject.SetActive(false);
    2.         Destroy(oldObject);
    Darenth likes this.