Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

How do you create a session configuration using ARKitWorldTrackingSessionConfiguration

Discussion in 'AR' started by dav10001, Nov 3, 2017.

  1. dav10001

    dav10001

    Joined:
    Nov 30, 2015
    Posts:
    10
    Hi guys does anyone know how to change the current ar session, I'm trying to have it so the plane detection for horizontal planes is turned off, I call this function using a event inside the ARKitManager script to stop the plane extending, however it doesn't work


    public void disablePlaneExtention()
    {
    m_session.Pause ();

    // create new config
    ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration();

    // set plane detection to none
    planeDetection = UnityARPlaneDetection.None;

    config.planeDetection = planeDetection;
    config.alignment = startAlignment;
    config.getPointCloudData = getPointCloud;
    config.enableLightEstimation = enableLightEstimation;

    // run session with new config and doesn't work
    m_session.RunWithConfig(config);
    print ("detection turned off");
    }