Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted ARKit Plane Classifications in MARS

Discussion in 'Unity MARS' started by zerozerozero, Jan 19, 2021.

  1. zerozerozero


    Mar 8, 2015
    Is there any way to access ARKit Plane Classifications in MARS? I'm trying to understand the relationship between ARFoundation and MARS - the ARFoundation samples have a scene that does this by grabbing the classification from the ARPlane class but planes are defined by the MRPlane class in MARS which doesn't have this property.

    Is there a way for ARFoundation to provide the classification to MARS? I see that the method ToMRPlane() in class ARPlaneExtensions doesn't copy over the PlaneClassification property. So now I'm thinking I need to write a custom Provider to copy this data into e.g. a custom MRPlaneClassification class. Would that work? How would I go about using such a provider?

    Or am I barking up the wrong tree?

  2. CiaranWills


    Unity Technologies

    Apr 24, 2020
    As you note we don't propagate the classification to MRPlane. If you want to add this (without modifying MARS itself) you can make a new provider from a copy of ARFoundationPlaneProvider that adds the extra data you want and then in the default functionality island use your provider for IProvidesPlaneFinding.