# 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://giantgrey.gitbook.io/pathgrid-documentation/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
