# int Unit::PathTo(Obj, int, int)

[Family: Unit](/imperivm/en/CKS/familias/unit/)

## Exact signature

```text
int Unit::PathTo(Obj, int, int)
```

## Description

Prepares an object-centered path query for a Unit and returns the native pathfinder result code or a sentinel.

## Parameters and return type

**Return type:** `int`

The member is called on an object. Its receiver is not repeated among this signature’s arguments.

| Position | Type |
| --- | --- |
| 1 | `Obj` |
| 2 | `int` |
| 3 | `int` |

## Other overloads

Check the exact signature. A description of one overload does not automatically document the others.

- [`int Unit::PathTo(point, int, int)`](/imperivm/en/CKS/reference/api-3fcf27d6e0741f/)

## Read and share

- [Markdown](/imperivm/exports/en/cks/api-55981d7c32f79d.md)
- [JSON](/imperivm/CKS/api/entries/api-55981d7c32f79d?lang=en)

Keep the notes and limitations when reusing this description. Do not infer undocumented parameter meanings, units or effects.
