> For the complete documentation index, see [llms.txt](https://giantgrey.gitbook.io/pathgrid-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giantgrey.gitbook.io/pathgrid-documentation/api.md).

# API

## PathGridSystem

<details>

<summary>GetCurrentPathNetwork</summary>

Returns current selected path network

</details>

<details>

<summary>GetCurrentPathPreset</summary>

Returns current selected path preset

</details>

<details>

<summary>GetCurrentPathPresetIndex</summary>

Returns current selected path preset index

</details>

<details>

<summary>SetPathNetworkIndex</summary>

* int \_index

Set new path network by index

</details>

<details>

<summary>SetPathPresetIndex</summary>

* int \_index

Set new path preset by index

</details>

<details>

<summary>AddPathTiles</summary>

* List\<Vector3> \_positions
* Action \_onCompleteCallback

Add new path tiles at positions on current path network

* List\<Vector3> \_positions
* int \_pathNetworkIndex
* int \_pathPresetIndex
* Action \_onCompleteCallback

Add new path tiles at positions with selected network and path preset

</details>

<details>

<summary>RemovePathTiles</summary>

* List\<Vector3> \_positions

Remove path tiles at positions on current path network

* List\<Vector3> \_positions
* int \_pathNetworkIndex

Remove path tiles on selected path network

</details>

## PathNetwork

<details>

<summary>GetGridCellTypeAtPosition</summary>

* Vector3: \_position

Returns the cell type at position

</details>

<details>

<summary>SetCellTypeAtPosition</summary>

* Vector3: \_position
* CellType: \_cellType

Sets a cell type at position

</details>

<details>

<summary>GetExistingPathCell</summary>

* Vector3: \_position

Returns a struct of type PathCellData which contains all cell informations such as tile type, location, neighbourCount, yRotation, mapPosition, tileObject and pathPreset

</details>

<details>

<summary>AddPathCells</summary>

* List\<Vector3>: \_positions
* PathPreset: \_pathPresetData
* Action: \_onCompleteCallback

Adds new path cells at position. Usually this should be called from PathGridSystem.

</details>

<details>

<summary>RemovePathCells</summary>

* List\<Vector3>: \_positions

Removes path cells at position. Usually this should be called from PathGridSystem.

</details>
