Function GraphMask.FromGraphName

FromGraphName (string graphName)

A bitmask containing the first graph with the given name.

Public Static
GraphMask FromGraphName (

string

graphName

)

A bitmask containing the first graph with the given name.

GraphMask mask1 = GraphMask.FromGraphName("My Grid Graph");
GraphMask mask2 = GraphMask.FromGraphName("My Other Grid Graph");

NNConstraint nn = NNConstraint.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);