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

ARKit Scan Surface

Discussion in 'AR' started by sdf124, Oct 20, 2017.

  1. sdf124

    sdf124

    Joined:
    Mar 4, 2016
    Posts:
    8
    I've seen this feature in many AR apps, but can't seem to figure out how it is done. When the games is first launched, how do you know when ARKit has detected a surface?

    Thank you
     
  2. innovis_io

    innovis_io

    Joined:
    Dec 12, 2015
    Posts:
    4
    You can register ARFrameUpdateEvent, and check if detected surface:

    List<ARPlaneAnchorGameObject> planes = unityARAnchorManager.GetCurrentPlaneAnchors();
    if (planes.Count > 0)
    {
    // You got your surface
    }