Loading...
Searching...
No Matches
CityBuilderCore.IPathfinder Interface Reference

Detailed Description

pathfinders calculate a path between points using different methods
there is a sub-interface for every PathType, this is done so a particular pathfinder can be requested from Dependencies

Inheritance diagram for CityBuilderCore.IPathfinder:
CityBuilderCore.IMapGridPathfinder CityBuilderCore.IMapPathfinder CityBuilderCore.IRoadPathfinder CityBuilderCore.IRoadPathfinderBlocked CityBuilderCore.NoPathfinding CityBuilderCore.GridPathfindingBase CityBuilderCore.StructurePaths CityBuilderCore.NavMeshPathfinding CityBuilderCore.GridPathfindingBase CityBuilderCore.RoadManagerBaseMulti CityBuilderCore.GridPathfindingBase CityBuilderCore.GridPathfinding CityBuilderCore.GridPathfindingBurst CityBuilderCore.GridPathfinding CityBuilderCore.GridPathfindingBurst CityBuilderCore.MultiRoadManager CityBuilderCore.GridPathfinding CityBuilderCore.GridPathfindingBurst

Public Member Functions

bool HasPoint (Vector2Int point, object tag=null)
 checks if a point exists within the pathfinder
for example points on map pathing that are blocked or points for road pathing that dont have a road
 
WalkingPath FindPath (Vector2Int[] starts, Vector2Int[] targets, object tag=null)
 attempts to find a path between one of the starts and one of the ends
 
PathQuery FindPathQuery (Vector2Int[] starts, Vector2Int[] targets, object tag=null)
 

Member Function Documentation

◆ FindPath()

WalkingPath CityBuilderCore.IPathfinder.FindPath ( Vector2Int[] starts,
Vector2Int[] targets,
object tag = null )

attempts to find a path between one of the starts and one of the ends

Parameters
startscollection of one or more possible start points
targetscollection of one or more possible start points
tagadditional pathfinding parameter(road type, walker info, ...)
Returns
the calculated path or null when no path was found

Implemented in CityBuilderCore.GridPathfinding, CityBuilderCore.GridPathfindingBase, CityBuilderCore.GridPathfindingBurst, CityBuilderCore.NavMeshPathfinding, CityBuilderCore.NoPathfinding, CityBuilderCore.RoadManagerBaseMulti, and CityBuilderCore.StructurePaths.

◆ HasPoint()

bool CityBuilderCore.IPathfinder.HasPoint ( Vector2Int point,
object tag = null )

checks if a point exists within the pathfinder
for example points on map pathing that are blocked or points for road pathing that dont have a road

Parameters
pointthe map point to check
tagadditional pathfinding parameter(road type, walker info, ...)
Returns
whether the point exists in the pathfinder

Implemented in CityBuilderCore.GridPathfinding, CityBuilderCore.GridPathfindingBase, CityBuilderCore.GridPathfindingBurst, CityBuilderCore.NavMeshPathfinding, CityBuilderCore.NoPathfinding, CityBuilderCore.RoadManagerBaseMulti, and CityBuilderCore.StructurePaths.