/// // This can be omitted in Unity 2021.3 and newer because a default implementation (returning true) can be used there.
/// public bool filterDiagonalGridConnections {
/// get {
/// return true;
/// }
/// }
/// }
/// </code>
///
/// See: traversal_provider (view in online documentation for working links)
/// </summary>
publicinterfaceITraversalProvider{
/// <summary>
/// Filter diagonal connections using <see cref="GridGraph.cutCorners"/> for effects applied by this ITraversalProvider.
/// This includes tags and other effects that this ITraversalProvider controls.
///
/// This only has an effect if <see cref="GridGraph.cutCorners"/> is set to false and your grid has <see cref="GridGraph.neighbours"/> set to Eight.
///
/// Take this example, the grid is completely walkable, but an ITraversalProvider is used to make the nodes marked with '#'
/// as unwalkable. The agent 'S' is in the middle.
///
/// <code>
/// ..........
/// ....#.....
/// ...<see cref="S"/>#....
/// ....#.....
/// ..........
/// </code>
///
/// If filterDiagonalGridConnections is false the agent will be free to use the diagonal connections to move away from that spot.
/// However, if filterDiagonalGridConnections is true (the default) then the diagonal connections will be disabled and the agent will be stuck.
///
/// Typically, there are a few common use cases:
/// - If your ITraversalProvider makes walls and obstacles and you want it to behave identically to obstacles included in the original grid graph scan, then this should be true.
/// - If your ITraversalProvider is used for agent to agent avoidance and you want them to be able to move around each other more freely, then this should be false.
///
/// See: <see cref="GridNode"/>
/// </summary>
boolfilterDiagonalGridConnections=>true;
/// <summary>True if node should be able to be traversed by the path.</summary>
/// True if the path can traverse a link between from and to and if to can be traversed itself.
/// If this method returns true then a call to CanTraverse(path,to) must also return true.
/// Thus this method is a more flexible version of <see cref="CanTraverse(Path,GraphNode)"/>.
///
/// If you only need the functionality for <see cref="CanTraverse(Path,GraphNode)"/> then you may implement this method by just forwarding it to <see cref="CanTraverse(Path,GraphNode)"/>