Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.

Question ARKit Plane Classifications in MARS

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

  1. zerozerozero

    zerozerozero

    Joined:
    Mar 8, 2015
    Posts:
    3
    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?

    Thanks
     
  2. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    151
    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.