public NodeHasher(AstarPath active) { hasher = default; this.debugData = active.debugPathData; includePathSearchInfo = debugData != null && (active.debugMode == GraphDebugMode.F || active.debugMode == GraphDebugMode.G || active.debugMode == GraphDebugMode.H || active.showSearchTree); includeAreaInfo = active.debugMode == GraphDebugMode.Areas; hasher.Add(active.debugMode); hasher.Add(active.debugFloor); hasher.Add(active.debugRoof); hasher.Add(AstarColor.ColorHash()); }
public void HashNode(GraphNode node) { hasher.Add(node.GetGizmoHashCode()); if (includeAreaInfo) { hasher.Add((int)node.Area); } if (includePathSearchInfo) { var pathNode = debugData.GetPathNode(node.NodeIndex); hasher.Add(pathNode.pathID); hasher.Add(pathNode.pathID == debugData.PathID); hasher.Add(pathNode.F); } }