Restrict a path

I am using a point graph for my game.

I have 2 paths that go to the same place. Base on some conditions in the game I want the path finding to select a specific path.

I managed to do this using a mask and enabling and disabling. Then use AstarPath.active.Scan();
I have initially had my path cashed. When I use the scan function what happen? Is there any change in performance?

Is there other ways to do this?

Hi

I would recommend that you use graph updating and tags. See this documentation page for more information: http://arongranberg.com/astar/docs/tags.php

Using AstarPath.active.Scan() recalculates the whole graph and is usually very slow. You should avoid calling it often.

PS: Sorry for the late answer, I have been away for a while and haven’t been able to answer many forum posts.