Are multiple tags not possible?

The documentation is not quite clear here, I thought that I could tag a node as multiple things, but when I use GetNearest with the Tag mask, I realize that I can’t? Just for clarification, is it possible? I tried to do it through code that looks like this:

	private void SetNodeAsWater( GraphNode node, bool isWater )
		if( isWater )
			node.Tag |= _navigationConfig.WaterTag;
			node.Tag &= ~_navigationConfig.WaterTag;

But the GetNearest method only accepts these nodes as tagged with Water if they have only the WaterTag.


No, multiple tags are not possible, I’m afraid.

You can fake it by treating the single tag as 5 tags (32 tags are supported, so 5 bits of info). It’s a bit annoying to use, but it definitely works.

For more elaborate needs, I usually recommend an ITraversalProvider. See Agent-Specific Pathfinding - A* Pathfinding Project