Search Unity

Magic Leap ARFoundation Anchor Subsystem does not implement TryAttachAnchor

Discussion in 'AR' started by Katerpilet, May 3, 2020.

  1. Katerpilet

    Katerpilet

    Joined:
    Aug 2, 2015
    Posts:
    87
    I am working on porting my game on ARFoundation that works on ARKit/ARCore to Magic Leap. I ran into an issue where I call:

    Code (CSharp):
    1. ARAnchorManager.AttachAnchor(aRFoundationTrackedPlane.ARPlane, new Pose(trackedPlane.PlaneCenter, trackedPlane.Rotation));
    And I get a null reference exception because Magic Leap does not implement the AttachAnchor API. An error should be returned instead of a null ref on a function call.