public void restart() { VuforiaBehaviour.Instance.enabled = false; // void StopExtendedTracking() PositionalDeviceTracker extendedTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); if (extendedTracker != null && extendedTracker.IsActive) { extendedTracker.Stop(); } //void StopTracking() TrackerManager.Instance.GetTracker <ObjectTracker>().Stop(); Task.Delay(2000).Wait(); //void StartExtendedTracking() //PositionalDeviceTracker extendedTracker = TrackerManager.Instance.GetTracker<PositionalDeviceTracker>(); if (extendedTracker != null && extendedTracker.IsActive) { extendedTracker.Start(); } //void StartTracking() TrackerManager.Instance.GetTracker <ObjectTracker>().Start(); VuforiaBehaviour.Instance.enabled = true; }
public virtual void ToggleDeviceTracking(bool enableDeviceTracking) { if (m_PositionalDeviceTracker != null) { if (enableDeviceTracking) { // if the positional device tracker is not yet started, start it if (!m_PositionalDeviceTracker.IsActive) { if (m_PositionalDeviceTracker.Start()) { Debug.Log("Successfully started device tracker"); } else { Debug.LogError("Failed to start device tracker"); } } } else if (m_PositionalDeviceTracker.IsActive) { m_PositionalDeviceTracker.Stop(); Debug.Log("Successfully stopped device tracker"); } } else { Debug.LogError("Failed to toggle device tracker state, make sure device tracker is initialized"); } m_DeviceTrackerEnabled = m_PositionalDeviceTracker.IsActive; }
public void Change() { PositionalDeviceTracker pdt = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); if (pdt != null && pdt.IsActive) { pdt.Stop(); //pdt.Start(); } SceneManager.LoadScene(1); }
public void ResetTrackers() { Debug.Log("ResetTrackers() called."); m_SmartTerrain = TrackerManager.Instance.GetTracker <SmartTerrain>(); m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); // Stop and restart trackers m_SmartTerrain.Stop(); // stop SmartTerrain tracker before PositionalDeviceTracker m_PositionalDeviceTracker.Stop(); m_PositionalDeviceTracker.Start(); m_SmartTerrain.Start(); // start SmartTerrain tracker after PositionalDeviceTracker }
public void ResetTrackers() { Debug.Log("ResetTrackets() Called."); m_SmartTerrain = TrackerManager.Instance.GetTracker <SmartTerrain>(); m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); m_SmartTerrain.Stop(); m_PositionalDeviceTracker.Stop(); m_PositionalDeviceTracker.Start(); m_SmartTerrain.Start(); }
void CheckIfEditor() { if (Application.isEditor == true) { PositionalDeviceTracker pdt = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); if (pdt != null && pdt.IsActive) { Debug.Log("stopping device pose\n"); pdt.Stop(); } } }
/// <summary> /// Activar/Desactivar positional tracker /// </summary> private void SetPositionTrackerVuforia() { Debug.Log("Set position"); PositionalDeviceTracker pdt = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); if (pdt != null) { if (IsTrackerPose) { pdt.Start(); } else { pdt.Stop(); } } finishPositionTracker.Invoke(); }
private void EnableDeviceTracker(bool value) { if (!_arCoreSupport) { return; } if (_positionalDeviceTracker == null) { _positionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); } if (value) { _positionalDeviceTracker.Start(); } else { _positionalDeviceTracker.Stop(); } }
private void update_VuforiaConfig_slamMode() { if (b_slamMode != b_SlamModeBeforeStep && !b_pdtFirstTime) { pdt_deviceTracker_slamMode = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>(); if (b_slamMode) { if (pdt_deviceTracker_slamMode == null) { pdt_deviceTracker_slamMode = TrackerManager.Instance.InitTracker <PositionalDeviceTracker>(); Debug.LogWarning("PDT ADD POSITION DEVICE"); } pdt_deviceTracker_slamMode.Start(); Debug.LogWarning("PDT START"); } else { pdt_deviceTracker_slamMode.Stop(); Debug.LogWarning("PDT STOP"); } } b_SlamModeBeforeStep = b_slamMode; }