Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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
    }