Hi
You can do that with the MultiTargetPath, however since the number of nodes with a specific tag is probably a very high number I would recommend that you use a slightly custom XPath instead. XPath is essentially like ABPath but you can set a custom ending condition. I recommend that you do something like
public class TagEndingCondition : PathEndingCondition {
public int tag;
public TagEndingCondition (int tag) {
this.tag = tag;
}
public override bool TargetFound (PathNode node) {
return node.Tag == tag;
}
}
And call it like
// Start the path without the same end point as start point because we don't really have a clear end point in this case
var path = XPath.Construct(start, start, null);
// Search outwards, not towards the end point
path.heuristic = Heuristic.None;
path.endingCondition = new TagEndingCondition(2 /* (or whatever) */);
seeker.StartPath(path, OnPathComplete);