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);
}
}
}