Exemplo n.º 1
0
 public override void Pause()
 {
     if (m_session != null)
     {
         m_session.Pause();
     }
 }
Exemplo n.º 2
0
    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;
        }
    }
Exemplo n.º 3
0
        // 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();
        }
Exemplo n.º 4
0
 public void PauseARkit()
 {
     if (m_currentARkitStatus == true && m_session != null)
     {
         m_session.Pause();
         m_currentARkitStatus = false;
     }
 }
Exemplo n.º 5
0
        public void Pause()
        {
            if (IsRunning)
            {
                m_session.Pause();

                IsRunning = false;
            }
        }
Exemplo n.º 6
0
        public void Pause()
        {
            if (IsRunning)
            {
#if MOTIVE_ARKIT
                m_session.Pause();
#endif

                IsRunning = false;
            }
        }
Exemplo n.º 7
0
    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);
        }
    }
Exemplo n.º 9
0
 private void OnDestroy()
 {
     m_session.Pause();
 }
Exemplo n.º 10
0
    public void ARKitTrackerPause()
    {
        m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface();

        m_session.Pause();
    }
Exemplo n.º 11
0
 //暂停方法
 public void OnPauseClick()
 {
     m_session.Pause();
 }
Exemplo n.º 12
0
 void OnDestroy()
 {
     ResetScene();
     m_session.Pause();
 }
Exemplo n.º 13
0
 public void StopSession()
 {
     m_session.Pause();
 }