# Navigation 설명

{% code title="MaxstSceneManager.cs" %}

```csharp
public void OnClickNavigation()
{
    RemovePaths();

    string accessToken = TrackerManager.GetInstance().GetAccessToken();

    if(XRAPI.Instance.spotData == null || XRAPI.Instance.placeData == null || XRAPI.Instance.placeData.place_unique_name == "" || XRAPI.Instance.spotData.vps_spot_name == "")
    {
        Debug.LogError("Can't Find Spot, Place Name");
        return;
    }
    
    if (!XRStudioController.Instance.ARMode)
    {
        VPSTrackable eachTrackable = vPSTrackablesList[0];
        NavigationController.FindPath(this, accessToken, XRAPI.Instance.spotData.vps_spot_name, arCamera.transform.position, XRAPI.Instance.spotData.vps_spot_name, new Vector3(11.82481f, 0f, 5.36951f), 2.0f, vPSTrackablesList.ToArray(),
            (paths) => {
                MakeNavigationArrowContent(paths);
            },
            () => {
                Debug.LogError("No Path");
            }, XRAPI.Instance.placeData.place_unique_name);
        return;
    }

    if (currentLocalizerLocation != null)
    {
        GameObject trackingObject = null;
        foreach (VPSTrackable eachTrackable in vPSTrackablesList)
        {
            foreach (string eachLocation in eachTrackable.localizerLocation)
            {
                if (currentLocalizerLocation == eachLocation)
                {
                    trackingObject = eachTrackable.gameObject;
                    break;
                }
            }
        }

        if (trackingObject != null)
        {
            NavigationController.FindPath(this, accessToken, XRAPI.Instance.spotData.vps_spot_name, arCamera.transform.position, XRAPI.Instance.spotData.vps_spot_name, new Vector3(11.82481f, 0f, 5.36951f), 2.0f, vPSTrackablesList.ToArray(),
            (paths) => {
                MakeNavigationArrowContent(paths);
            },
            () => {
                Debug.LogError("No Path");
            }, XRAPI.Instance.placeData.place_unique_name);
        }
    }
}
```

{% endcode %}

* 네비게이션 경로는 NavigationController.FindPath() 함수의 파라미터인 **place\_unique\_name**를 통해서 요청하게 됩니다. place\_unique\_name는 placeId를 통해서 획득하게 됩니다.
* 요청된 결과로 현재 사용자의 위치로 부터 목적지까지의 경로를 얻게 됩니다.
* MakeNavigationArrowContent() 함수로 컨텐츠 결과물을 확인할 수 있습니다.
* 네비게이션 검색 파라미터는 Trackable에 포함 되어 있습니다.
* 목적지에 대한 좌표는 POI를 통해서 획득 하거나, 메쉬의 주변부의 좌표를 획득해서 얻을 수 있습니다.

<figure><img src="/files/Bnnh8volZWzUI2ey21OX" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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://docs.maxverse.io/unity/navigation.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.
