Cannot clear/delete any navmesh- weird bug

I have a strange bug in 2019.4.13f1

I’m using the legacy Navmesh system. I’m unable to clear any navmeshes and every navmesh that was baked in any scene shows up in every scene, even in new scenes :eyes:

Example- I make a new scene and this is here

I hit clear Navmesh and nothing happens. There was about 7 navmesh like this in every scene I could only remove them by finding the navmesh assets in the project and deleting them but this one persists.

I want to switch over to the Navmesh Component system in this project but I need to get rid of this ghost navmesh first. Any ideas? Thanks

[SOLVED]

A quit/relaunch got rid of the ghost Navmesh and I switched over to the component system

3 Likes

Still see this all the time in the component-based navmesh. It’s very annoying.

1 Like

+1
Unity 2021.3.13f1. Problem appears with domain-reload disabled. It is not just “Ghost” navmesh. Agents keep using invalid navmesh(both valid and invalid, from another scene) making them move ignoring walls etc.
FIX ASAP!

Yeah it’s super frustrating. We just added a stupid helper menu item so you can open an empty scene and run this to clear it without restarting the editor.

        [MenuItem("Light Brigade/Debug/Force Cleanup NavMesh")]
        public static void ForceCleanupNavMesh()
        {
            if (Application.isPlaying)
                return;

            NavMesh.RemoveAllNavMeshData();
        }
4 Likes

This worked great - I just stopped to say thankyou

1 Like

thank you!

1 Like

Hi I have same problem. When I create new scene, the old navmesh form first navmesh of scene I play will replace in new scene

So elegant, it deserves a huge : “THANK YOU”

Grateful for you sharing that menu item! I’m amazed (and not amazed) that Unity has done nothing to fix this bug for several years.

Just ran into this issue today on 2021.3.31f1, appreciate the script for getting around this bug! Been fighting my navMesh agents not moving correctly for over an hour after I added some obstacles and rebaked and noticed that even after clearing there was still navMesh data. So frustrating.