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

# Поиск пути

Ссылка на хорошую статью.

```
https://habr.com/post/414453/
```

Заставить объект двигаться к определённой цели.

```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class MoveGoalScript : MonoBehaviour {
    void Start () {
        Vector3 pos = GameObject.Find("goalObj").transform.position;
        NavMeshAgent scr = gameObject.GetComponent<NavMeshAgent>();
        scr.destination = pos;
    }
}
```
