public override void Pause() { if (m_session != null) { m_session.Pause(); } }
public void ToggleVideo() { UnityARVideo arVideo = m_camera.gameObject.GetComponent <UnityARVideo>(); ARKitWorldTrackingSessionConfiguration _config = new ARKitWorldTrackingSessionConfiguration(); if (arVideo.enabled && arVideo != null) { _config.enableAutoFocus = false; _config.planeDetection = UnityARPlaneDetection.None; _config.enableLightEstimation = false; _config.getPointCloudData = false; m_session.Pause(); arVideo.enabled = false; } else { _config.planeDetection = planeDetection; _config.alignment = startAlignment; _config.getPointCloudData = getPointCloud; _config.enableLightEstimation = enableLightEstimation; _config.enableAutoFocus = enableAutoFocus; m_camera.clearFlags = CameraClearFlags.SolidColor; m_session.RunWithConfig(_config); arVideo.enabled = true; } }
// Token: 0x0600BF9A RID: 49050 RVA: 0x00357244 File Offset: 0x00355444 protected override void OnStop() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnStop_hotfix != null) { this.m_OnStop_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; base.OnStop(); InviteNotifyUITask.EnableDispaly(); NoticeUIController.IsForceHide = false; UnityARSessionNativeInterface arsessionNativeInterface = UnityARSessionNativeInterface.GetARSessionNativeInterface(); ARKitWorldTrackingSessionConfiguration config = default(ARKitWorldTrackingSessionConfiguration); config.planeDetection = UnityARPlaneDetection.Horizontal; config.alignment = UnityARAlignment.UnityARAlignmentGravity; config.getPointCloudData = false; config.enableLightEstimation = false; if (config.IsSupported) { arsessionNativeInterface.RunWithConfig(config); } arsessionNativeInterface.Pause(); }
public void PauseARkit() { if (m_currentARkitStatus == true && m_session != null) { m_session.Pause(); m_currentARkitStatus = false; } }
public void Pause() { if (IsRunning) { m_session.Pause(); IsRunning = false; } }
public void Pause() { if (IsRunning) { #if MOTIVE_ARKIT m_session.Pause(); #endif IsRunning = false; } }
void OnGUI() { // 创建暂停按钮 if (GUI.Button(new Rect(50, 50, 100, 50), "会话暂停")) { // 会话暂停 m_session.Pause(); } // 创建开始按钮 if (GUI.Button(new Rect(100, 200, 100, 50), "会话开始")) { // 新建世界跟踪配置类 ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration(); config.alignment = UnityARAlignment.UnityARAlignmentGravity; config.planeDetection = UnityARPlaneDetection.Horizontal; config.enableLightEstimation = true; config.getPointCloudData = true; // 重置会话 m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors); } }
void OnGUI() { if (GUI.Button(new Rect(100, 100, 200, 50), "session pause")) { m_session.Pause(); } if (GUI.Button(new Rect(300, 100, 200, 50), "session run")) { m_session.Run(); } if (GUI.Button(new Rect(100, 200, 200, 50), "renew & run")) { ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration(); config.alignment = UnityARAlignment.UnityARAlignmentGravityAndHeading; config.planeDetection = UnityARPlaneDetection.Horizontal; config.enableLightEstimation = true; config.getPointCloudData = true; //m_session.RunWithConfig (config); m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionResetTracking); } if (GUI.Button(new Rect(300, 200, 200, 50), "renew & close")) { ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration(); config.alignment = UnityARAlignment.UnityARAlignmentGravity; config.planeDetection = UnityARPlaneDetection.Horizontal; config.enableLightEstimation = true; config.getPointCloudData = true; //m_session.RunWithConfig (config); m_session.RunWithConfigAndOptions(config, UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors); } }
private void OnDestroy() { m_session.Pause(); }
public void ARKitTrackerPause() { m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); m_session.Pause(); }
//暂停方法 public void OnPauseClick() { m_session.Pause(); }
void OnDestroy() { ResetScene(); m_session.Pause(); }
public void StopSession() { m_session.Pause(); }