Beispiel #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
    }
Beispiel #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();
    }
Beispiel #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;
    }
Beispiel #4
0
 public void OnExitClick()
 {
     mInitButtonPanel.SetActive(true);
     mExitButton.SetActive(false);
     LibPlacenote.Instance.StopSession();
     mPlaneGenerator.ClearPlanes();
 }