Script Reference

IPathService.cs

Small interface used by MovementMotor to request paths without depending on a specific pathfinding implementation.

InterfacePathfindingExtension
On this page

Overview#

IPathService lets MovementMotor request paths through an abstraction instead of depending directly on TilePathService.

Use this if you want to replace the included pathfinding with your own path system while keeping the movement layer intact.

Inspector Settings#

IPathService is an interface, so it has no Inspector settings.

Public API#

RequestPath(TileCoord startTile, TileCoord endTile)

Returns a PathResult for the requested start and end tiles.

Runtime Properties#

No runtime properties.

Common Usage#

public class CustomPathService : MonoBehaviour, IPathService
{
    public PathResult RequestPath(TileCoord startTile, TileCoord endTile)
    {
        // Return your custom path here.
    }
}