I have scenes for UI and the current scene where the player is, so when I switch scenes I unload the current one and additively add the next one.
The problem is that Astar shows the error saying I can’t have more than 2 Pathfinder components. So then I deleted the component immediately when switching the scene, and a bunch of null reference exceptions came, because all the agents are still searching for paths. So now I made it wait until the scene was fully unloaded to load the new one, so there are no 2 pathfinder components at the same time, but it shows a warning saying there are no mesh filters found. Also I kind of don’t like the fact that I have to wait for it to be unloaded.
I searched on the forum and have been troubling myself with this for a long time so I hope someone can help me.
Thanks!