Struct GraphMask
A combination of graphs.
Represents a set of graphs, which is usually used to filter which graphs to use for pathfinding, or which graphs to apply an update to.
This mask can hold any subset of small graph indices (up to graph index 30), but only a combination of at most 3 graphs of large graph indices (larger than 30). Almost all games will use only one or a few graphs, so you can think of this as being able to represent any combination of graphs.
GraphMask mask1 = GraphMask.FromGraphName("My Grid Graph");
GraphMask mask2 = GraphMask.FromGraphName("My Other Grid Graph");
NearestNodeConstraint nn = NearestNodeConstraint.Walkable;
nn.graphMask = mask1 | mask2;
// Find the node closest to somePoint which is either in 'My Grid Graph' OR in 'My Other Grid Graph'
var info = AstarPath.active.GetNearest(somePoint, nn);
Public Methods
Public Static Methods
Public Variables
True if the mask contains all graphs, i.e.
Public Static Variables
A mask containing every graph.
Private/Protected Members
Internal representation of the mask.