Search Unity

AR Kit example scene & image anchors not working

Discussion in 'AR' started by ManjitSBedi, Sep 27, 2018.

  1. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    58
    I am trying out the example scene "UnityARImageAnchor.unity' that comes with the ARKit plugin from Bit Bucket.

    The reference images are both 512 x 512 but I am getting a curious run-time error & also the app seems to stop working. I am using an iphone X running iOS 12. I have not changed any settings in the scene.


    [Technique] Could not add planar object for detection: <ARReferenceImage: 0x281482080 name="unitylogoreferenceimage" physicalSize=(0.000, 0.000)> Reason: 4

    [Technique] Could not add planar object for detection: <ARReferenceImage: 0x2814874d0 name="unitywhiteonblack" physicalSize=(0.000, 0.000)> Reason: 4

    [Session] Session (0x1083255d0): did fail with error: Error Domain=com.apple.arkit.error Code=300 "Invalid reference image." UserInfo={NSLocalizedFailureReason=One or more reference images have an invalid size: unitylogoreferenceimage, unitywhiteonblack, NSLocalizedRecoverySuggestion=Make sure that all reference images are greater than 100 pixels and have a positive physical size in meters., ARErrorItems=(

    unitylogoreferenceimage,

    unitywhiteonblack

    ), NSLocalizedDescription=Invalid reference image.}
     
  2. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    58
    In the newer plug-in, the assets are working & then I added my own new image resources but they would get the same error at run-time with the size being invalid. They definitely have a size value set in the generated Xcode project.

    I had to convert the images to JPEGs & they would work at run-time in iOS. Is this indicating a problem with Xcode & or the AR Kit framework at run-time?