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

ARInterface: getting ARTrackingState

Discussion in 'AR/VR (XR) Discussion' started by John1515, Feb 17, 2018.

  1. John1515

    John1515

    Joined:
    Nov 29, 2012
    Posts:
    248
    This is prob due to my limited C# knowledge, but I just cannot get the contents of ARTrackingState in my script.
    I have:
    Code (CSharp):
    1. ARTrackingState state = new ARTrackingState();
    and in Update()
    Code (CSharp):
    1. Debug.Log ("tracking state  "+state);
    But in Xcode it always returns:
    ARTrackingStateNotAvailable

    how do I get the current tracking state?
     
  2. bradweiers

    bradweiers

    Joined:
    Nov 3, 2015
    Posts:
    59
    I don't think this was actually exposed in ARInterface. I would get it directly from the ARKit or ARCore plugins.

    For ARCore
    For ARKit