Exemple #1
0
    private void ConfigureSession(bool clearPlanes)
    {
#if !UNITY_EDITOR
        ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration();

        if (mPlaneDetectionToggle.GetComponent <Toggle>().isOn)
        {
            if (UnityARSessionNativeInterface.IsARKit_1_5_Supported())
            {
                config.planeDetection = UnityARPlaneDetection.HorizontalAndVertical;
            }
            else
            {
                config.planeDetection = UnityARPlaneDetection.Horizontal;
            }
            mPNPlaneManager.StartPlaneDetection();
        }
        else
        {
            config.planeDetection = UnityARPlaneDetection.None;
            if (clearPlanes)
            {
                mPNPlaneManager.ClearPlanes();
            }
        }

        config.alignment             = UnityARAlignment.UnityARAlignmentGravity;
        config.getPointCloudData     = true;
        config.enableLightEstimation = true;
        mSession.RunWithConfig(config);
#endif
    }
Exemple #2
0
    public void OnExitClick()
    {
        mInitButtonPanel.SetActive(true);
        mExitButton.SetActive(false);
        mPlaneDetectionToggle.SetActive(false);

        //clear all existing planes
        mPNPlaneManager.ClearPlanes();
        mPlaneDetectionToggle.GetComponent <Toggle>().isOn = false;

        LibPlacenote.Instance.StopSession();
    }
Exemple #3
0
    public void OnExitClick()
    {
        paintManager.Reset();
        mExitButton.SetActive(false);
        mPlaneDetectionToggle.SetActive(false);

        //clear all existing planes
        mPNPlaneManager.ClearPlanes();
        mPlaneDetectionToggle.GetComponent <Toggle>().isOn = false;

        LibPlacenote.Instance.StopSession();
        mappingStarted = false;   // allow a new mapping session to begin auto. in Update
        ActivateMapButton(false); // Should change to true in NewMapClicked
        hasLocalized = false;
    }
Exemple #4
0
 public void OnExitClick()
 {
     mInitButtonPanel.SetActive(true);
     mExitButton.SetActive(false);
     LibPlacenote.Instance.StopSession();
     mPlaneGenerator.ClearPlanes();
 }