Difference between GraphMask, LayerMask and TagMask

Hi,

There are GraphMasks which allow me to have different obstacles for different graphs (and assign one or multiple of them to an agent or use it as restriction in seeker.StartPath).

But there is also LayerMask where I don’t understand the difference to GraphMasks.

In PathUtilities.IsPathPossible() I can pass a tagMask parameter. What is this? is it GraphMask.value?

Please enlighten me.

Hi

A GraphMask is a mask for graphs. A LayerMask is a mask for Unity layers. A TagMask is a mask for tags (https://arongranberg.com/astar/docs/tags.php). They are used for different things in the library.
See https://arongranberg.com/astar/docs/bitmasks.html

Would be nice to have a page which describes these “Different Things” and when one should use which of them…

Your answer wasn’t very enlightening :frowning:

Hi

A mask is essentially just a set of things like [Layer 1, Layer 2, Layer 5] or [Graph 1, Graph 2, Graph 5]. Just because they are all masks doesn’t mean they are comparable. Layers cannot really be compared to Graphs, they are fundamentally as different as apples and jet planes.

If you have some more information about what you want to achieve or what issues you are having then I might be able to help you better :slight_smile:

My point is, that it would be nice to have an overview where the differences are. If you say, they are not comparable, then I assume I am wrong and layers cannot restrict paths and are for a completely different purpose…

Here is what I already achieve with graph masks:
I have two graph masks for two kind of characters: one can use doors, one cannot use doors. These graph masks are essentially the same except for grid-tiles where doors are placed (one has it free, one has it blocked).

I wonder if graphs is the best approach here or if I rather should mark doors with a tag or layer instead.