Using Area instead of Tag

Hi

The tags field is limited to 32 values because it is in a bitpacked field to reduce memory usage. You can move it to its own field to get up to 2^31 tags though.

In the GraphNode.cs file, replace these lines

/** Node tag.
 * \see \ref tags
 */
public uint Tag {
	get {
		return (flags & FlagsTagMask) >> FlagsTagOffset;
	}
	set {
		flags = flags & ~FlagsTagMask | value << FlagsTagOffset;
	}
}

with

/** Node tag.
 * \see \ref tags
 */
public uint Tag { get; set; }

Note that if you are saving and loading graphs during runtime (see https://www.arongranberg.com/astar/docs/save-load-graphs.php) then tag info will no longer be saved. If you need to save the tag info you will have to modify the GraphNode.SerializeNode and GraphNode.DeserializeNode methods to add the Tag field.

Also note that while this will allow you to set very large tag values, the tag mask fields that are in e.g the NNConstraint class still assumes that there are only 32 tags. Which other parts you will have to change depends on what you are going to use it for.

See also Having more than 32 tags and large ennemies