async def query_pathing(
        self, start: Union[Unit, Point2, Point3], end: Union[Point2, Point3]
    ) -> Optional[Union[int, float]]:
        """ Caution: returns 0 when path not found """
        assert isinstance(start, (Point2, Unit))
        assert isinstance(end, Point2)
        if isinstance(start, Point2):
            result = await self._execute(
                query=query_pb.RequestQuery(
                    pathing=[
                        query_pb.RequestQueryPathing(
                            start_pos=common_pb.Point2D(x=start.x, y=start.y),
                            end_pos=common_pb.Point2D(x=end.x, y=end.y),
                        )
                    ]
                )
            )
        else:
            result = await self._execute(
                query=query_pb.RequestQuery(
                    pathing=[
                        query_pb.RequestQueryPathing(unit_tag=start.tag, end_pos=common_pb.Point2D(x=end.x, y=end.y))
                    ]
                )
            )
        distance = float(result.query.pathing[0].distance)
        if distance <= 0.0:
            return None
        return distance
async def query_pathing ( self , start : Union [ Unit , Point2 , Point3 ] , end : Union [ Point2 , Point3 ] ) -> Optional [ Union [ int , float ] ] : assert isinstance ( start , ( Point2 , Unit ) ) assert isinstance ( end , Point2 ) if isinstance ( start , Point2 ) : result = await self . _execute ( query = query_pb . RequestQuery ( pathing = [ query_pb . RequestQueryPathing ( start_pos = common_pb . Point2D ( x = start . x , y = start . y ) , end_pos = common_pb . Point2D ( x = end . x , y = end . y ) , ) ] ) ) else : result = await self . _execute ( query = query_pb . RequestQuery ( pathing = [ query_pb . RequestQueryPathing ( unit_tag = start . tag , end_pos = common_pb . Point2D ( x = end . x , y = end . y ) ) ] ) ) distance = float ( result . query . pathing [ 0 ] . distance ) if distance <= 0.0 : return None return distance
Caution: returns 0 when path not found