How to have seperate recast graph?

I have a big scene, and different part have different enemy, I want to seperate them so they only stay in their area.
But I can not find a way to tag my graph!
I have try the tagmask, I tag gave two area different tag, created two graph with different tag mask, and hit scan. It always generate two identical graphs to me. This isn’t helpful, I don’t even know what’s the use of the tagmask, I cannot even use graphmask to startpath for different enemy, because both of the graph are the same.
It should be a simply thing to do, even unity navigation have different area you can choose to bake into.


You can use tags, but the ‘tagmask’ refers to Unity tags, more specifically you can specify which objects should be included when scanning the graph.
You will have to use a graph update (e.g the GraphUpdateScene component) to update the graph where you want to set a tag. See

Thanks for your reply, but I can not find where to specify which objects should be included.
When I hit scan, it just scan two graph automatically, also I did set it to unity tag.

So I set the gameobject I wanted to scan to specific tag, and used the tag mask in graph, but it seems not ignoring anything else.

Also I can’t quite know the order that you specify a path first and then startpath to cull the graphmask. Isn’t that path already have a start and end? And then will the path recalculate itself if they land on different graph layer?

You know what!!!!!
You can either have Layer Mask or Tag Mask, you can not have both together.
So if I choose to scan Ground layer and Grass tag
Anything in Ground layer or Grass tag will be scanned.
What I thought should be happend is anything with Ground layer and Grass tag will be scanned.
But that’s what I hope it could do.


Yes, as it says in the interface “Objects contained in any of these masks will be rasterized”. There are probably cases where you want the other behavior, but I thought the current behavior would be more useful. If you explicitly want to include a particular object in the rasterization process you can add a RecastMeshObj component to it.

There is currently no way to specify that a particular object should apply a particular pathfinding tag to the graph when it is rasterized. It is a feature I have been wanting to add however, I just haven’t had the time to do it. You can use a GraphUpdateScene object to apply a pathfinding tag to a group of nodes.