Usage example - Nav3D Doc

Docy Child

Пример использования

Ниже приведен пример использования объекта Path для нахождения пути между А и В

					using Nav3D.API;
using System;
using UnityEngine;

class YourGameScenario : MonoBehaviour
    private void Start()

        Vector3 a = new Vector3(-10, 10, 10);
        Vector3 b = new Vector3(-10, 10, 10);

        FindPath(a, b, PrintPath);

    //your method for pathfinding from A to B
    void FindPath(Vector3 _A, Vector3 _B, Action<Vector3[]> _OnPathFound)
        //create Path instance
        Path path = Nav3DPathfindingManager.PrefetchPath(_A, _B);

        //perform pathfinding from _A to _B
        path.UpdatePath(_OnSuccess: () =>
            //notify that path was found
            UnityEngine.Debug.Log("Path successfully found!");

            //invoke callback

            //finish work with Path instance

    void PrintPath(Vector3[] _Path)
        for (int i = 0; i < _Path.Length - 1; i++)
            UnityEngine.Debug.LogError($"Path point {i}: {_Path[i]}");

Agent log

In the second section, you can get the contents of the agent log by clicking on ...

Debug drawing

In the first section, you can visualize the agent and his nearest environment. T...

Создание и настройка описания агента из кода

All Nav3DAgentDescription parameters configured in the description inspector c...


Nav3DManager is a helper static class. Can be useful for checking whether Nav3D ...


To use Nav3D in playmode, you need to initialize it. The Nav3DInitializer compon...


To use the possibility of pre-baking obstacles on the scene in editor mode and t...


To manage obstacles on the scene, the Nav3DObstacle component is designed. Attac...

Сочетания препятствий

We will call obstacles with the selected processing mode “Runtime” as runtim...

Операции с препятствиями

Regardless of the obstacle processing mode, the processing procedure consists of...

Немного глубже о препятствиях

As already described above, in order for an obstacle to be taken into account du...

Nav3DAgent : Debug

The Nav3DAgent and its inheritors have an inspector that provides several useful...


As mentioned above, you can use the Nav3DAgent script as a component for your ga...

Chat Icon Close Icon