Support Forum

Can you have 2 pathfinder components across different scenes?

I have a main menu scene that I wanted to have a pathfinder recast graph setup.

But I load my main gameplay scene as an additive scene which has its own pathfinder recast graph.

Disabling the main menu pathfinder and/or disabling the pathfinder component doesn’t work. You still end up with two pathfinder classes running, subscribed to events etc which causes multiple issues such as the exception " ArgumentException: An item with the same key has already been added".

Note there are no warnings or errors indicating having two pathfinder objects loaded across two different scenes even though one is disabled/inactive.

Can I have two pathfinder graphs setup in two different scenes or do I have to destroy then re-create the other one when loading/unloading my other scene?